summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ManagementServer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ManagementServer.cpp b/src/ManagementServer.cpp
index 9687278..9a22776 100644
--- a/src/ManagementServer.cpp
+++ b/src/ManagementServer.cpp
@@ -206,10 +206,12 @@ void ManagementServer::serverThread()
while (m_running) {
zmq::message_t zmq_message;
- m_zmq_sock.recv(&zmq_message);
-
-
- handle_message(zmq_message);
+ if (m_zmq_sock.recv(&zmq_message, ZMQ_DONTWAIT)) {
+ handle_message(zmq_message);
+ }
+ else {
+ usleep(10000);
+ }
}
m_fault = true;