mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 05:29:43 +01:00
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>
This commit is contained in:
@@ -45,7 +45,7 @@ namespace zmq
|
||||
protected:
|
||||
|
||||
// Overloads of functions from socket_base_t.
|
||||
void xattach_pipe (zmq::pipe_t *pipe_);
|
||||
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_);
|
||||
int xrecv (zmq::msg_t *msg_, int flags_);
|
||||
bool xhas_in ();
|
||||
void xread_activated (zmq::pipe_t *pipe_);
|
||||
|
||||
Reference in New Issue
Block a user