From b79d07b8bc844135c44c1ff8b84b50dc08f56925 Mon Sep 17 00:00:00 2001 From: Jon Dyte Date: Wed, 16 Mar 2011 09:54:03 +0100 Subject: reset socket state when identity message cannot be written to xrep Signed-off-by: Jon Dyte --- src/xrep.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3