|
@@ -122,6 +122,7 @@ public:
|
|
|
calls_mutex.lock();
|
|
calls_mutex.lock();
|
|
|
auto iter = calls.find(res->id());
|
|
auto iter = calls.find(res->id());
|
|
|
if (iter == calls.end()) {
|
|
if (iter == calls.end()) {
|
|
|
|
|
+ calls_mutex.unlock();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
auto ctx = iter->second;
|
|
auto ctx = iter->second;
|
|
@@ -147,7 +148,9 @@ public:
|
|
|
req->id();
|
|
req->id();
|
|
|
auto ctx = std::make_shared<protorpc::ProtoRpcContext>();
|
|
auto ctx = std::make_shared<protorpc::ProtoRpcContext>();
|
|
|
ctx->req = req;
|
|
ctx->req = req;
|
|
|
|
|
+ calls_mutex.lock();
|
|
|
calls[req->id()] = ctx;
|
|
calls[req->id()] = ctx;
|
|
|
|
|
+ calls_mutex.unlock();
|
|
|
// Request::SerializeToArray + protorpc_pack
|
|
// Request::SerializeToArray + protorpc_pack
|
|
|
protorpc_message msg;
|
|
protorpc_message msg;
|
|
|
protorpc_message_init(&msg);
|
|
protorpc_message_init(&msg);
|