mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-15 10:18:01 +08:00
Merge pull request #116 from daveab/master
Fix race to crash: when a message is sent as the last connection is lost Fixes #1002
This commit is contained in:
commit
346527a1cf
@ -113,7 +113,8 @@ int zmq::lb_t::send (msg_t *msg_, int flags_)
|
||||
more = msg_->flags () & msg_t::more? true: false;
|
||||
if (!more) {
|
||||
pipes [current]->flush ();
|
||||
current = (current + 1) % active;
|
||||
if (++current >= active)
|
||||
current = 0;
|
||||
}
|
||||
|
||||
// Detach the message from the data buffer.
|
||||
|
Loading…
x
Reference in New Issue
Block a user