aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-07 10:16:17 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-07 10:16:17 +0200
commitd423927765f72c8300f27a46d80452d54c39cbf9 (patch)
tree1d72d713aca8c629a5d23906495a625911db16eb /src
parent0bb9b364693659a184862771f98a4b6046587073 (diff)
downloaddabmux-d423927765f72c8300f27a46d80452d54c39cbf9.tar.gz
dabmux-d423927765f72c8300f27a46d80452d54c39cbf9.tar.bz2
dabmux-d423927765f72c8300f27a46d80452d54c39cbf9.zip
Use nonblocking management server ZMQ recv
Diffstat (limited to 'src')
-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;