summaryrefslogtreecommitdiff
path: root/src/req.cpp
diff options
context:
space:
mode:
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;