From f61921d09679c4bed15204ec4e55d1c7313e3f6a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 28 Sep 2010 07:39:16 +0200 Subject: REQ socket can die when reply is delivered on wrong unerlying connection -- fixed --- src/req.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/req.cpp b/src/req.cpp index f3695a2..a77c061 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -111,10 +111,8 @@ void zmq::req_t::xkill (class reader_t *pipe_) void zmq::req_t::xrevive (class reader_t *pipe_) { - // TODO: Actually, misbehaving peer can cause this kind of thing. - // Handle it decently, presumably kill the offending connection. - zmq_assert (pipe_ == reply_pipe); - reply_pipe_active = true; + if (pipe_ == reply_pipe) + reply_pipe_active = true; } void zmq::req_t::xrevive (class writer_t *pipe_) -- cgit v1.2.3 From c1deb226f4d1bc94c158c050088813aae96775e9 Mon Sep 17 00:00:00 2001 From: Dhammika Pathirana Date: Tue, 28 Sep 2010 07:46:17 +0200 Subject: crash when closing an ypipe -- fixed --- src/ypipe.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ypipe.hpp b/src/ypipe.hpp index 26f021c..1785b71 100644 --- a/src/ypipe.hpp +++ b/src/ypipe.hpp @@ -127,7 +127,7 @@ namespace zmq inline bool check_read () { // Was the value prefetched already? If so, return. - if (&queue.front () != r) + if (&queue.front () != r && r) return true; // There's no prefetched value, so let us prefetch more values. -- cgit v1.2.3