diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:08:55 +0900 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:08:55 +0900 |
commit | a703420f7a1a15d9cacde7bb4031b8e67e978da7 (patch) | |
tree | 31abcf0f03fb79453d9bb60aac1a1572a8e0516c | |
parent | 6d51452c555dbc2e086f1ceff7a1859f1d9bf9eb (diff) |
Race condition during socket close fixed
zmq_close() cannot be synchronised even though ZMQ_REENTRANT is set.
It's user's responsibility not to invoke the socket from another
thread once zmq_close() have been called.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r-- | src/socket_base.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 718263f..fb387db 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -711,8 +711,6 @@ int xs::socket_base_t::recv (msg_t *msg_, int flags_) int xs::socket_base_t::close () { - sync.lock (); - // Mark the socket as dead. tag = 0xdeadbeef; @@ -721,7 +719,6 @@ int xs::socket_base_t::close () // process. send_reap (this); - sync.unlock (); return 0; } |