summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ManagementServer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ManagementServer.cpp b/src/ManagementServer.cpp
index 599d744..568e80e 100644
--- a/src/ManagementServer.cpp
+++ b/src/ManagementServer.cpp
@@ -280,8 +280,10 @@ void ManagementServer::serverThread()
if (pollItems[0].revents & ZMQ_POLLIN) {
zmq::message_t zmq_message;
- m_zmq_sock.recv(zmq_message);
- handle_message(zmq_message);
+ const auto r = m_zmq_sock.recv(zmq_message);
+ if (r.has_value()) {
+ handle_message(zmq_message);
+ }
}
}
}