Commit 712e36d2 authored by Ian Barber's avatar Ian Barber

Merge pull request #288 from pieterh/master

Mark sockets as invalid when closed, not reaped
parents 6f720f00 27c28bdc
......@@ -136,9 +136,6 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_, int sid_) :
zmq::socket_base_t::~socket_base_t ()
{
zmq_assert (destroyed);
// Mark the socket as dead.
tag = 0xdeadbeef;
}
zmq::mailbox_t *zmq::socket_base_t::get_mailbox ()
......@@ -666,6 +663,9 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
int zmq::socket_base_t::close ()
{
// Mark the socket as dead
tag = 0xdeadbeef;
// Transfer the ownership of the socket from this application thread
// to the reaper thread which will take care of the rest of shutdown
// process.
......
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