summaryrefslogtreecommitdiff
path: root/src/epoll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/epoll.cpp')
-rw-r--r--src/epoll.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/epoll.cpp b/src/epoll.cpp
index 15278c6..5f3bc51 100644
--- a/src/epoll.cpp
+++ b/src/epoll.cpp
@@ -41,10 +41,12 @@ zmq::epoll_t::epoll_t () :
zmq::epoll_t::~epoll_t ()
{
+ // Wait till the worker thread exits.
+ worker.stop ();
+
// Make sure there are no fds registered on shutdown.
zmq_assert (load.get () == 0);
- worker.stop ();
close (epoll_fd);
for (retired_t::iterator it = retired.begin (); it != retired.end (); it ++)
delete *it;