From d1373792f7888f312cd7286fdf524a0bfe124846 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 23 Jun 2011 07:57:47 +0200 Subject: 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 --- src/pipe.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pipe.hpp') diff --git a/src/pipe.hpp b/src/pipe.hpp index df85bc2..437d84d 100644 --- a/src/pipe.hpp +++ b/src/pipe.hpp @@ -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]); -- cgit v1.2.3