zeromq/libzmq — pull request #1160 by rodgert (2014-08-12 20:07:23+00:00)
Title: fix #1058 pipe_t needs to take ownership of metadata

The issue boils down to -

* the sending side will call close() on a message after placing it in the pipe (and before returning form zmq_msg_send()), causing any associated metadata to have a reference decremented.
* the receiving side will also call close() on a message after delivering it, without having taken ownership of the metadata.

I am not entirely happy with this fix, but I don't know a better way of fixing it without significantly altering the implementation of msg_t to properly support copy/move construction (and likely breaking other assumptions).