0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-03 03:45:43 +08:00

Merge pull request #397 from hurtonm/master

Code cleanup
This commit is contained in:
Pieter Hintjens 2012-07-06 04:02:17 -07:00
commit 823d14c7fc

View File

@ -822,16 +822,16 @@ int zmq::socket_base_t::process_commands (int timeout_, bool throttle_)
rc = mailbox.recv (&cmd, 0);
}
// Process all the commands available at the moment.
while (true) {
if (rc == -1 && errno == EAGAIN)
break;
if (rc == -1 && errno == EINTR)
return -1;
errno_assert (rc == 0);
// Process all available commands.
while (rc == 0) {
cmd.destination->process_command (cmd);
rc = mailbox.recv (&cmd, 0);
}
}
if (errno == EINTR)
return -1;
zmq_assert (errno == EAGAIN);
if (ctx_terminated) {
errno = ETERM;