mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-28 03:20:13 +01:00
make sure that reader does not terminate in the middle of a multipart message
This commit is contained in:
committed by
Martin Sustrik
parent
2142b8918a
commit
1d431190f5
1
AUTHORS
1
AUTHORS
@@ -30,6 +30,7 @@ Matus Hamorsky <mhamorsky@gmail.com>
|
|||||||
Max Wolf <YIDIEPXGXGPN@spammotel.com>
|
Max Wolf <YIDIEPXGXGPN@spammotel.com>
|
||||||
McClain Looney <m@loonsoft.com>
|
McClain Looney <m@loonsoft.com>
|
||||||
Mikael Helbo Kjaer <mhk@designtech.dk>
|
Mikael Helbo Kjaer <mhk@designtech.dk>
|
||||||
|
Nir Soffer <nirsof@gmail.com>
|
||||||
Pavel Gushcha <pavimus@gmail.com>
|
Pavel Gushcha <pavimus@gmail.com>
|
||||||
Pavol Malosek <malosek@fastmq.com>
|
Pavol Malosek <malosek@fastmq.com>
|
||||||
Pieter Hintjens <ph@imatix.com>
|
Pieter Hintjens <ph@imatix.com>
|
||||||
|
|||||||
@@ -101,6 +101,13 @@ void zmq::xrep_t::terminated (reader_t *pipe_)
|
|||||||
for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end ();
|
for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end ();
|
||||||
it++) {
|
it++) {
|
||||||
if (it->reader == pipe_) {
|
if (it->reader == pipe_) {
|
||||||
|
if (inpipes [current_in].reader == pipe_) {
|
||||||
|
|
||||||
|
// A reader is not allowed to terminate in the middle of a
|
||||||
|
// multipart message.
|
||||||
|
zmq_assert (!prefetched);
|
||||||
|
zmq_assert (!more_in);
|
||||||
|
}
|
||||||
inpipes.erase (it);
|
inpipes.erase (it);
|
||||||
if (terminating)
|
if (terminating)
|
||||||
unregister_term_ack ();
|
unregister_term_ack ();
|
||||||
|
|||||||
Reference in New Issue
Block a user