Commit e9c0b2c0 authored by TousakaRin's avatar TousakaRin

Fix null pointer bug in thrift_protocol

parent 8ff7f4ed
......@@ -232,8 +232,11 @@ void ThriftClosure::DoRun() {
if (span) {
span->set_start_send_us(butil::cpuwide_time_us());
}
ScopedMethodStatus method_status(_server->options().thrift_service->_status,
_server, &_controller, cpuwide_start_us());
Socket* sock = accessor.get_sending_socket();
ScopedMethodStatus method_status(
server->options().thrift_service ?
server->options().thrift_service->_status : NULL,
_server, &_controller, cpuwide_start_us());
if (!method_status) {
// Judge errors belongings.
// may not be accurate, but it does not matter too much.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment