From 858b8ad76757624464c139be2367f0dce53f8c3b Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Thu, 16 Feb 2012 10:05:18 +0900 Subject: Fix data loss for PUB/SUB and unidirectional transports (LIBZMQ-268) With the introduction of subscription forwarding, the first message sent on a PUB socket using a unidirectional transport (e.g. PGM) is always lost due to the "subscribe to all" being done asynchronously. This patch fixes the problem and also refactors the code to have a single point where the "subscribe to all" is performed. Signed-off-by: Martin Lucina --- src/xreq.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xreq.hpp') diff --git a/src/xreq.hpp b/src/xreq.hpp index 837cc8a..ab3a360 100644 --- a/src/xreq.hpp +++ b/src/xreq.hpp @@ -46,7 +46,7 @@ namespace xs protected: // Overloads of functions from socket_base_t. - void xattach_pipe (xs::pipe_t *pipe_); + void xattach_pipe (xs::pipe_t *pipe_, bool icanhasall_); int xsend (xs::msg_t *msg_, int flags_); int xrecv (xs::msg_t *msg_, int flags_); bool xhas_in (); -- cgit v1.2.3