Permalink
Browse files

reset socket state when identity message cannot be written to xrep

 Signed-off-by: Jon Dyte <jon@totient.co.uk>
  • Loading branch information...
1 parent 7045a4a commit b79d07b8bc844135c44c1ff8b84b50dc08f56925 @JonDyte JonDyte committed with sustrik Mar 16, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/xrep.cpp
View
@@ -184,9 +184,11 @@ int zmq::xrep_t::xsend (zmq_msg_t *msg_, int flags_)
int rc = zmq_msg_init (&empty);
zmq_assert (rc == 0);
if (!current_out->check_write (&empty)) {
+ it->second.active = false;
+ more_out = false;
+ current_out = NULL;
rc = zmq_msg_close (&empty);
zmq_assert (rc == 0);
- it->second.active = false;
errno = EAGAIN;
return -1;
}

0 comments on commit b79d07b

Please sign in to comment.