Fixed JSON RPC handling during shutdown

This commit is contained in:
SChernykh
2022-07-05 14:29:41 +02:00
parent 340a3e85c8
commit 4ec0fe8d96
3 changed files with 54 additions and 9 deletions
+5 -1
View File
@@ -365,7 +365,7 @@ void Call(const std::string& address, int port, const std::string& req, const st
loop = uv_default_loop();
}
CallOnLoop(loop,
const bool result = CallOnLoop(loop,
[=]()
{
try {
@@ -376,6 +376,10 @@ void Call(const std::string& address, int port, const std::string& req, const st
(*close_cb)(msg, strlen(msg));
}
});
if (!result) {
LOGERR(1, "JSON RPC \"" << req << "\" failed");
}
}
} // namespace JSONRPCRequest