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/options.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/options.hpp') diff --git a/src/options.hpp b/src/options.hpp index 858ec2e..70144b2 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -87,6 +87,14 @@ namespace zmq // is not aware of the peer's identity, however, it is able to send // messages straight away. bool immediate_connect; + + // If true, session reads all the pending messages from the pipe and + // sends them to the network when socket is closed. + bool delay_on_close; + + // If true, socket reads all the messages from the pipe and delivers + // them to the user when the peer terminates. + bool delay_on_disconnect; }; } -- cgit v1.2.3