|
|
@ -314,13 +314,16 @@ ProtoReflectionDescriptorDatabase::GetStream() { |
|
|
|
return stream_; |
|
|
|
return stream_; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ProtoReflectionDescriptorDatabase::DoOneRequest( |
|
|
|
bool ProtoReflectionDescriptorDatabase::DoOneRequest( |
|
|
|
const ServerReflectionRequest& request, |
|
|
|
const ServerReflectionRequest& request, |
|
|
|
ServerReflectionResponse& response) { |
|
|
|
ServerReflectionResponse& response) { |
|
|
|
|
|
|
|
bool request_succeed = false; |
|
|
|
stream_mutex_.lock(); |
|
|
|
stream_mutex_.lock(); |
|
|
|
GetStream()->Write(request); |
|
|
|
if (GetStream()->Write(request) && GetStream()->Read(&response)) { |
|
|
|
GetStream()->Read(&response); |
|
|
|
request_succeed = true; |
|
|
|
|
|
|
|
} |
|
|
|
stream_mutex_.unlock(); |
|
|
|
stream_mutex_.unlock(); |
|
|
|
|
|
|
|
return request_succeed; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} // namespace grpc
|
|
|
|
} // namespace grpc
|
|
|
|