summaryrefslogtreecommitdiff
path: root/src/req.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-04-16 15:10:21 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-04-16 15:10:21 +0200
commit0ad302e8cb506234c15f0992329b0ea6d580daf0 (patch)
tree227e02f8db5d772316ca1a9d5c0eabb5e5f2735b /src/req.cpp
parent48210efd8498cbf666919495ed5873b1355fce62 (diff)
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 <sustrik@250bpm.com>
Diffstat (limited to 'src/req.cpp')
-rw-r--r--src/req.cpp5
1 files changed, 4 insertions, 1 deletions
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;