Commit c9d124b2 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #251 from gimaker/sub-sndhwn-assert

Drop subscription messages when reaching the SNDHWM rather than assertin...
parents bfbe556e e18f9da0
......@@ -215,7 +215,12 @@ void zmq::xsub_t::send_subscription (unsigned char *data_, size_t size_,
// Send it to the pipe.
bool sent = pipe->write (&msg);
zmq_assert (sent);
// If we reached the SNDHWM, and thus cannot send the subscription, drop
// the subscription message instead. This matches the behaviour of
// zmq_setsockopt(ZMQ_SUBSCRIBE, ...), which also drops subscriptions
// when the SNDHWM is reached.
if (!sent)
msg.close ();
}
zmq::xsub_session_t::xsub_session_t (io_thread_t *io_thread_, bool connect_,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment