summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:08:55 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:08:55 +0900
commita703420f7a1a15d9cacde7bb4031b8e67e978da7 (patch)
tree31abcf0f03fb79453d9bb60aac1a1572a8e0516c /src
parent6d51452c555dbc2e086f1ceff7a1859f1d9bf9eb (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>
Diffstat (limited to 'src')
-rw-r--r--src/socket_base.cpp3
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;
}