summaryrefslogtreecommitdiffstats
path: root/src/ManagementServer.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-17 09:51:30 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-17 09:51:30 +0100
commit0d17e6f1a0ea8f3052f3eae54e437afcdad5fa95 (patch)
tree87711bd70e0c1b500a17fafc98109560b71b0199 /src/ManagementServer.cpp
parent0b7d58968b37dc9d36a90d3fb439891a57b81a18 (diff)
downloaddabmux-0d17e6f1a0ea8f3052f3eae54e437afcdad5fa95.tar.gz
dabmux-0d17e6f1a0ea8f3052f3eae54e437afcdad5fa95.tar.bz2
dabmux-0d17e6f1a0ea8f3052f3eae54e437afcdad5fa95.zip
ManagementServer: handle zmq sock recv returning failure
Diffstat (limited to 'src/ManagementServer.cpp')
-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);
+ }
}
}
}