summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devpoll.cpp3
-rw-r--r--src/kqueue.cpp3
-rw-r--r--src/poll.cpp4
3 files changed, 6 insertions, 4 deletions
diff --git a/src/devpoll.cpp b/src/devpoll.cpp
index ac5c72f..2386034 100644
--- a/src/devpoll.cpp
+++ b/src/devpoll.cpp
@@ -54,10 +54,11 @@ zmq::devpoll_t::devpoll_t ()
zmq::devpoll_t::~devpoll_t ()
{
+ worker.stop ();
+
// Make sure there are no fds registered on shutdown.
zmq_assert (load.get () == 0);
- worker.stop ();
close (devpoll_fd);
}
diff --git a/src/kqueue.cpp b/src/kqueue.cpp
index f4c58a3..c967c73 100644
--- a/src/kqueue.cpp
+++ b/src/kqueue.cpp
@@ -42,10 +42,11 @@ zmq::kqueue_t::kqueue_t ()
zmq::kqueue_t::~kqueue_t ()
{
+ worker.stop ();
+
// Make sure there are no fds registered on shutdown.
zmq_assert (load.get () == 0);
- worker.stop ();
close (kqueue_fd);
}
diff --git a/src/poll.cpp b/src/poll.cpp
index 94e4fd4..dd3de43 100644
--- a/src/poll.cpp
+++ b/src/poll.cpp
@@ -52,10 +52,10 @@ zmq::poll_t::poll_t () :
zmq::poll_t::~poll_t ()
{
+ worker.stop ();
+
// Make sure there are no fds registered on shutdown.
zmq_assert (load.get () == 0);
-
- worker.stop ();
}
zmq::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_)