From af598f2e1ce5a403d69575b022ef3a02f6a96b59 Mon Sep 17 00:00:00 2001 From: sunddy Date: Mon, 12 Jun 2017 12:26:21 +0800 Subject: [PATCH] fix bug: dish client does not resend subscriptions to radio server after radio server restart problem: for zmq radio/dish pattern, if the radio process restarts, the dish will not resend subscriptions to radio. And the result is that the dish will never receive any more messages. solution: in session_base_t::reconnect (), take ZMQ_DISH into consideration when invoking hiccup method. --- src/session_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/session_base.cpp b/src/session_base.cpp index aa8dd63337..97fd08a105 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -521,7 +521,7 @@ void zmq::session_base_t::reconnect () // For subscriber sockets we hiccup the inbound pipe, which will cause // the socket object to resend all the subscriptions. - if (pipe && (options.type == ZMQ_SUB || options.type == ZMQ_XSUB)) + if (pipe && (options.type == ZMQ_SUB || options.type == ZMQ_XSUB || options.type == ZMQ_DISH)) pipe->hiccup (); }