Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed issue 228, backported from 3.0
  • Loading branch information
hintjens committed Jul 14, 2011
1 parent 8ada962 commit 2b56dc1
Show file tree
Hide file tree
Showing 15 changed files with 528 additions and 375 deletions.
4 changes: 2 additions & 2 deletions NEWS
@@ -1,10 +1,9 @@
0MQ version 2.2.0 (beta), released on 2011/04/xx
0MQ version 2.2.0 (beta), released on 2011/09/xx
================================================

Bug fixes
---------


Changes
-------

Expand All @@ -20,3 +19,4 @@ Changes
against peers sending oversized messages. If a peer sends an oversized
message, the connection to that peer is dropped.

Also includes all bug fixes and changes in 2.1.x.
2 changes: 2 additions & 0 deletions src/Makefile.am
Expand Up @@ -58,6 +58,7 @@ libzmq_la_SOURCES = \
select.hpp \
semaphore.hpp \
session.hpp \
signaler.hpp \
socket_base.hpp \
stdint.hpp \
sub.hpp \
Expand Down Expand Up @@ -118,6 +119,7 @@ libzmq_la_SOURCES = \
req.cpp \
select.cpp \
session.cpp \
signaler.cpp \
socket_base.cpp \
sub.cpp \
swap.cpp \
Expand Down
7 changes: 7 additions & 0 deletions src/config.hpp
Expand Up @@ -36,6 +36,13 @@ namespace zmq
// memory allocation by approximately 99.6%
message_pipe_granularity = 256,

// Commands in pipe per allocation event.
command_pipe_granularity = 16,

// Size in bytes of the largest message that is still copied around
// rather than being reference-counted.
max_vsm_size = 29,

// Determines how often does socket poll for new commands when it
// still has unprocessed messages to handle. Thus, if it is set to 100,
// socket will process 100 inbound messages before doing the poll.
Expand Down
2 changes: 1 addition & 1 deletion src/ctx.cpp
Expand Up @@ -143,7 +143,7 @@ int zmq::ctx_t::terminate ()

// Wait till reaper thread closes all the sockets.
command_t cmd;
int rc = term_mailbox.recv (&cmd, true);
int rc = term_mailbox.recv (&cmd, -1);
if (rc == -1 && errno == EINTR)
return -1;
zmq_assert (rc == 0);
Expand Down
2 changes: 1 addition & 1 deletion src/io_thread.cpp
Expand Up @@ -72,7 +72,7 @@ void zmq::io_thread_t::in_event ()

// Get the next command. If there is none, exit.
command_t cmd;
int rc = mailbox.recv (&cmd, false);
int rc = mailbox.recv (&cmd, 0);
if (rc != 0 && errno == EINTR)
continue;
if (rc != 0 && errno == EAGAIN)
Expand Down

0 comments on commit 2b56dc1

Please sign in to comment.