From 0ad302e8cb506234c15f0992329b0ea6d580daf0 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 16 Apr 2012 15:10:21 +0200 Subject: Few trivial fixes to REQ/REP pattern. - couple of comments adjusted - empty 'stack delimiter' message correctly closed - non-reachable function xrep_t::rollback() removed Signed-off-by: Martin Sustrik --- src/req.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/req.cpp') diff --git a/src/req.cpp b/src/req.cpp index da9dd0e..7dc97ea 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -55,9 +55,12 @@ int xs::req_t::xsend (msg_t *msg_, int flags_) errno_assert (rc == 0); bottom.set_flags (msg_t::more); rc = xreq_t::xsend (&bottom, 0); - if (rc != 0) + if (rc != 0) { + bottom.close (); return -1; + } message_begins = false; + bottom.close (); } bool more = msg_->flags () & msg_t::more ? true : false; -- cgit v1.2.3