summaryrefslogtreecommitdiff
path: root/src/reaper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/reaper.cpp')
-rw-r--r--src/reaper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/reaper.cpp b/src/reaper.cpp
index 4710a91..7829482 100644
--- a/src/reaper.cpp
+++ b/src/reaper.cpp
@@ -96,12 +96,13 @@ void zmq::reaper_t::process_stop ()
void zmq::reaper_t::process_reap (socket_base_t *socket_)
{
- // Start termination of associated I/O object hierarchy.
- socket_->terminate ();
-
// Add the socket to the poller.
socket_->start_reaping (poller);
+ // Start termination of associated I/O object hierarchy.
+ socket_->terminate ();
+ socket_->check_destroy ();
+
++sockets;
}