Commit f98b5bb5 authored by Doron Somech's avatar Doron Somech

Merge pull request #1964 from bluca/sock_close_read_after_free

Problem: read-after-free when closing socket
parents e9380b5a 17132f03
......@@ -1290,12 +1290,13 @@ int zmq::socket_base_t::close ()
// Mark the socket as dead
tag = 0xdeadbeef;
EXIT_MUTEX ();
// Transfer the ownership of the socket from this application thread
// to the reaper thread which will take care of the rest of shutdown
// process.
send_reap (this);
EXIT_MUTEX ();
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