Skip to content

Commit

Permalink
fix bug: dish client does not resend subscriptions to radio server af…
Browse files Browse the repository at this point in the history
…ter 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.
  • Loading branch information
sunddy committed Jun 12, 2017
1 parent 9980593 commit af598f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/session_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
}

Expand Down

0 comments on commit af598f2

Please sign in to comment.