summaryrefslogtreecommitdiff
path: root/src/session.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/session.cpp')
-rw-r--r--src/session.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/session.cpp b/src/session.cpp
index ac2dd12..bc334e0 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -54,7 +54,12 @@ bool zmq::session_t::read (::zmq_msg_t *msg_)
bool zmq::session_t::write (::zmq_msg_t *msg_)
{
- return out_pipe->write (msg_);
+ if (out_pipe->write (msg_)) {
+ zmq_msg_init (msg_);
+ return true;
+ }
+
+ return false;
}
void zmq::session_t::flush ()