From da1ef4d2685c02e8320847d49a38726b2b6d52f0 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Sun, 8 May 2011 09:02:47 +0200 Subject: Fixed REP assert on missing envelope Signed-off-by: Pieter Hintjens --- src/xrep.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/xrep.cpp') diff --git a/src/xrep.cpp b/src/xrep.cpp index 77481c3..f662aaf 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -61,7 +61,7 @@ void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_, if (terminating) { register_term_acks (1); - outpipe_->terminate (); + outpipe_->terminate (); } } @@ -289,6 +289,17 @@ int zmq::xrep_t::xrecv (msg_t *msg_, int flags_) return -1; } +int zmq::xrep_t::rollback (void) +{ + if (current_out) { + current_out->rollback (); + current_out = NULL; + more_out = false; + } + return 0; +} + + bool zmq::xrep_t::xhas_in () { // There are subsequent parts of the partly-read message available. -- cgit v1.2.3