Commit b0ee6b0c authored by Martin Sustrik's avatar Martin Sustrik

ZMQII-62: zmq_close after sending message via P2P socket fails

parent bbaa494f
...@@ -93,6 +93,11 @@ int zmq::p2p_t::xsend (zmq_msg_t *msg_, int flags_) ...@@ -93,6 +93,11 @@ int zmq::p2p_t::xsend (zmq_msg_t *msg_, int flags_)
outpipe->write (msg_); outpipe->write (msg_);
if (!(flags_ & ZMQ_NOFLUSH)) if (!(flags_ & ZMQ_NOFLUSH))
outpipe->flush (); outpipe->flush ();
// Detach the original message from the data buffer.
int rc = zmq_msg_init (msg_);
zmq_assert (rc == 0);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment