Unverified Commit ed66780a authored by kladko's avatar kladko

SKALE-4284

parent d898fb07
......@@ -76,6 +76,14 @@ void ZMQServer::run() {
spdlog::info("Bound port ...");
while (!isExitRequested) {
try {
zmqServer->doOneServerLoop();
} catch (...) {
spdlog::error("doOneServerLoop threw exception. This should never happen!");
}
}
}
......@@ -97,6 +105,7 @@ void ZMQServer::exitZMQServer() {
}
}
void ZMQServer::initZMQServer(bool _checkSignature) {
static bool initedServer = false;
CHECK_STATE(!initedServer)
......@@ -115,15 +124,13 @@ void ZMQServer::initZMQServer(bool _checkSignature) {
zmqServer = make_shared<ZMQServer>(_checkSignature, rootCAPath);
CHECK_STATE(zmqServer);
CHECK_STATE(zmqServer)
serverThread = make_shared<thread>(std::bind(&ZMQServer::run, ZMQServer::zmqServer));
serverThread->detach();
spdlog::info("Inited zmq server ...");
while (!isExitRequested) {
try {
zmqServer->doOneServerLoop();
} catch (...) {
spdlog::error("doOneServerLoop threw exception. This should never happen!");
}
}
}
......
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