[PATCH] reset socket state when identity message cannot be written to xrep Signed-off-by: Jon Dyte <jon at totient.co.uk>

Jon Dyte jon at totient.co.uk
Wed Mar 16 00:08:12 CET 2011


---
 src/xrep.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/xrep.cpp b/src/xrep.cpp
index 5406a0b..039908b 100644
--- a/src/xrep.cpp
+++ b/src/xrep.cpp
@@ -186,6 +186,8 @@ int zmq::xrep_t::xsend (zmq_msg_t *msg_, int flags_)
                 if (!current_out->check_write (&empty)) {
                     rc = zmq_msg_close (&empty);
                     zmq_assert (rc == 0);
+                    more_out = false;
+                    current_out = NULL;
                     it->second.active = false;
                     errno = EAGAIN;
                     return -1;
-- 
1.6.3.3


--------------060109020105090501090205--


More information about the zeromq-dev mailing list