summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-16 15:37:20 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-16 15:37:20 +0200
commit35c58dc7331e3c5033b16829dff40437efe97a81 (patch)
tree3ce7bca72c38768204cbd4acb59bc9bc746ed785
parentfc7715b4636be7a0d49f27234359ddfddce23f5b (diff)
ZMQII-1: fix for devpoll, kqueue & poll
-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_)