diff --git a/image_pusher/ZMQStream2PusherSocket.cpp b/image_pusher/ZMQStream2PusherSocket.cpp index 2b9334a97..64475b649 100644 --- a/image_pusher/ZMQStream2PusherSocket.cpp +++ b/image_pusher/ZMQStream2PusherSocket.cpp @@ -3,6 +3,8 @@ #include "ZMQStream2PusherSocket.h" +#include + void zmq_socket_free(void *data, void *hint) { auto z = (ZeroCopyReturnValue *) hint; z->release(); @@ -56,6 +58,10 @@ void ZMQStream2PusherSocket::WriterThread() { // When hitting timeout on SendZeroCopy consider it a transmission error and switch to non-blocking communication bool blocking_send = !transmission_error; if (!s.SendZeroCopy(e.z->GetImage(), e.z->GetImageSize(), zmq_socket_free, e.z, blocking_send)) { + if (!transmission_error) + spdlog::warn("ZeroMQ image socket {}: send blocked for over a second - image {} dropped, and " + "images that find the queue full are dropped for the rest of the run", + s.GetEndpointName(), e.z->GetImageNumber()); transmission_error = true; // The slot is already released: on a failed send SendZeroCopy closes the message, and // closing a zmq_msg_init_data message runs its free function (zmq_socket_free).