mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 20:59:47 +01:00
Outstanding requests dropped when requester dies (issue 190)
So far the requests in req/rep pattern were delivered to and processed by worker even though the original requester was dead. Thus, the worker processing replies with noone to deliver results to. This optimisation drops requests in two situations: 1. Queued inbound requests in XREP socket when peer disconnects. 2. Queued outbound requests in XREQ when socket is closed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
@@ -34,8 +34,9 @@ namespace zmq
|
||||
// Create a pipepair for bi-directional transfer of messages.
|
||||
// First HWM is for messages passed from first pipe to the second pipe.
|
||||
// Second HWM is for messages passed from second pipe to the first pipe.
|
||||
// Delay specifies whether the pipe receives all the pending messages
|
||||
// before terminating or whether it terminates straight away.
|
||||
// Delay specifies how the pipe behaves when the peer terminates. If true
|
||||
// pipe receives all the pending messages before terminating, otherwise it
|
||||
// terminates straight away.
|
||||
int pipepair (class object_t *parents_ [2], class pipe_t* pipes_ [2],
|
||||
int hwms_ [2], bool delays_ [2]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user