Merge pull request #21 from hintjens/master

Fixed issue #1362
This commit is contained in:
Pieter Hintjens 2015-02-20 09:15:02 +01:00
commit 6072d3dbdc
2 changed files with 4 additions and 0 deletions

2
NEWS
View File

@ -11,6 +11,8 @@
* Fixed #1347 - lack way to get peer address. * Fixed #1347 - lack way to get peer address.
* Fixed #1362 - SUB socket sometimes fails to resubscribe properly.
0MQ version 4.1.0 rc1, released on 2014/10/14 0MQ version 4.1.0 rc1, released on 2014/10/14
============================================= =============================================

View File

@ -257,6 +257,8 @@ void zmq::pipe_t::process_hiccup (void *pipe_)
outpipe->flush (); outpipe->flush ();
msg_t msg; msg_t msg;
while (outpipe->read (&msg)) { while (outpipe->read (&msg)) {
if (!(msg.flags () & msg_t::more))
msgs_written--;
int rc = msg.close (); int rc = msg.close ();
errno_assert (rc == 0); errno_assert (rc == 0);
} }