diff options
author | Jon Dyte <jon@totient.co.uk> | 2011-03-16 09:54:03 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-03-16 09:54:03 +0100 |
commit | b79d07b8bc844135c44c1ff8b84b50dc08f56925 (patch) | |
tree | d090b9c48ee35ec0718177a2448ec281a18ae4d8 | |
parent | 7045a4a21327f19170e282f6ba2d25caff13aa90 (diff) |
reset socket state when identity message cannot be written to xrep
Signed-off-by: Jon Dyte <jon@totient.co.uk>
-rw-r--r-- | src/xrep.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xrep.cpp b/src/xrep.cpp index 5406a0b..7f0da4d 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -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; } |