diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-02-07 11:31:05 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-02-07 11:31:05 +0100 |
commit | b0ee6b0c8ab8a5052a5e111dda24308dd00c0d62 (patch) | |
tree | 6abffa8a89e3f775afe1daacb59f6ee95e938376 | |
parent | bbaa494fb569d94c356ddecca7dbf249ffc217cf (diff) |
ZMQII-62: zmq_close after sending message via P2P socket fails
-rw-r--r-- | src/p2p.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/p2p.cpp b/src/p2p.cpp index 9a5e186..72bc26b 100644 --- a/src/p2p.cpp +++ b/src/p2p.cpp @@ -93,6 +93,11 @@ int zmq::p2p_t::xsend (zmq_msg_t *msg_, int flags_) outpipe->write (msg_); if (!(flags_ & ZMQ_NOFLUSH)) outpipe->flush (); + + // Detach the original message from the data buffer. + int rc = zmq_msg_init (msg_); + zmq_assert (rc == 0); + return 0; } |