Unverified Commit 150b2cda authored by kladko's avatar kladko

SKALE-4586 Added Thread Pool

parent 9e9f36bc
...@@ -230,12 +230,13 @@ void ZMQServer::doOneServerLoop() { ...@@ -230,12 +230,13 @@ void ZMQServer::doOneServerLoop() {
result = parsedMsg->process(); result = parsedMsg->process();
} catch (ExitRequestedException) {
throw;
} catch (std::exception &e) { } catch (std::exception &e) {
result["errorMessage"] = string(e.what()); result["errorMessage"] = string(e.what());
spdlog::error("Exception in zmq server :{}", e.what()); spdlog::error("Exception in zmq server :{}", e.what());
spdlog::error("ID:" + string((char *) identity.data(), identity.size())); spdlog::error("ID:" + string((char *) identity.data(), identity.size()));
spdlog::error("Client request :" + stringToParse); spdlog::error("Client request :" + stringToParse);
} catch (...) { } catch (...) {
spdlog::error("Error in zmq server "); spdlog::error("Error in zmq server ");
result["errorMessage"] = "Error in zmq server "; result["errorMessage"] = "Error in zmq server ";
...@@ -244,7 +245,6 @@ void ZMQServer::doOneServerLoop() { ...@@ -244,7 +245,6 @@ void ZMQServer::doOneServerLoop() {
} }
try { try {
Json::FastWriter fastWriter; Json::FastWriter fastWriter;
fastWriter.omitEndingLineFeed(); fastWriter.omitEndingLineFeed();
...@@ -266,17 +266,12 @@ void ZMQServer::doOneServerLoop() { ...@@ -266,17 +266,12 @@ void ZMQServer::doOneServerLoop() {
} }
exit(-16); exit(-16);
} }
} catch (ExitRequestedException) {
throw;
} catch (std::exception &e) { } catch (std::exception &e) {
if (isExitRequested) {
return;
}
spdlog::error("Exception in zmq server worker send :{}", e.what()); spdlog::error("Exception in zmq server worker send :{}", e.what());
exit(-17); exit(-17);
} catch (...) { } catch (...) {
if (isExitRequested) {
return;
}
spdlog::error("Unklnown exception in zmq server worker send"); spdlog::error("Unklnown exception in zmq server worker send");
exit(-18); exit(-18);
} }
......
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