diff options
author | Pieter Hintjens <ph@imatix.com> | 2011-05-08 09:02:47 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-05-08 09:02:47 +0200 |
commit | da1ef4d2685c02e8320847d49a38726b2b6d52f0 (patch) | |
tree | f4b63f141a2a01c6e7a1d4366e678e15820ae5de /src/xrep.cpp | |
parent | 0c5b781e97f2bea42925495a5505c51e769fba7f (diff) |
Fixed REP assert on missing envelope
Signed-off-by: Pieter Hintjens <ph@imatix.com>
Diffstat (limited to 'src/xrep.cpp')
-rw-r--r-- | src/xrep.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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. |