diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-17 09:51:30 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-17 09:51:30 +0100 |
commit | 0d17e6f1a0ea8f3052f3eae54e437afcdad5fa95 (patch) | |
tree | 87711bd70e0c1b500a17fafc98109560b71b0199 | |
parent | 0b7d58968b37dc9d36a90d3fb439891a57b81a18 (diff) | |
download | dabmux-0d17e6f1a0ea8f3052f3eae54e437afcdad5fa95.tar.gz dabmux-0d17e6f1a0ea8f3052f3eae54e437afcdad5fa95.tar.bz2 dabmux-0d17e6f1a0ea8f3052f3eae54e437afcdad5fa95.zip |
ManagementServer: handle zmq sock recv returning failure
-rw-r--r-- | src/ManagementServer.cpp | 6 |
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); + } } } } |