mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 02:42:58 +01:00
router: always respect message boundaries
The current implementaion of router socket does not handle the full pipe and unroutable messages properly. Namely, in those cases, the socket could route some message parts into a wrong connection.
This commit is contained in:
parent
476c9b97c9
commit
600488fa9c
@ -154,11 +154,9 @@ int zmq::router_t::xsend (msg_t *msg_, int flags_)
|
||||
current_out = it->second.pipe;
|
||||
if (!current_out->check_write ()) {
|
||||
it->second.active = false;
|
||||
more_out = false;
|
||||
current_out = NULL;
|
||||
}
|
||||
} else if(fail_unroutable) {
|
||||
more_out = false;
|
||||
errno = EHOSTUNREACH;
|
||||
retval = -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user