mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 00:46:05 +01:00
Dont wait for pending subscription commands on shutdown
When (X)SUB socket is being shut down there may be pending outbound subscription commands in the pipes. In such case we want to close the socket immediately instead of waiting for the commands to be sent. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
91fdedf25c
commit
3fbe8ac3c3
@ -30,6 +30,11 @@ zmq::xsub_t::xsub_t (class ctx_t *parent_, uint32_t tid_) :
|
||||
more (false)
|
||||
{
|
||||
options.type = ZMQ_XSUB;
|
||||
|
||||
// When socket is being closed down we don't want to wait till pending
|
||||
// subscription commands are sent to the wire.
|
||||
options.linger = 0;
|
||||
|
||||
int rc = message.init ();
|
||||
errno_assert (rc == 0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user