diff options
author | Martin Lucina <martin@lucina.net> | 2012-02-16 10:05:18 +0900 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:05:18 +0900 |
commit | 858b8ad76757624464c139be2367f0dce53f8c3b (patch) | |
tree | bf174496a722d151d33e861f9bdd43a199007b1d /src/xsub.hpp | |
parent | cfba1f07987434263843f4aaee11ec088ec6ced3 (diff) |
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 <martin@lucina.net>
Diffstat (limited to 'src/xsub.hpp')
-rw-r--r-- | src/xsub.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xsub.hpp b/src/xsub.hpp index 6b1e26b..f9e5210 100644 --- a/src/xsub.hpp +++ b/src/xsub.hpp @@ -45,7 +45,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_); bool xhas_out (); int xrecv (xs::msg_t *msg_, int flags_); |