diff options
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r-- | src/socket_base.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp index ea6d3ed..3854dc2 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -129,9 +129,6 @@ xs::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_, int sid_) : xs::socket_base_t::~socket_base_t () { xs_assert (destroyed); - - // Mark the socket as dead. - tag = 0xdeadbeef; } xs::mailbox_t *xs::socket_base_t::get_mailbox () @@ -623,6 +620,9 @@ int xs::socket_base_t::recv (msg_t *msg_, int flags_) int xs::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. |