summaryrefslogtreecommitdiff
path: root/src/dispatcher.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-21 17:20:13 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-21 17:20:13 +0200
commitb15f695976d21300beabc3e0ecef87c1a0b4dc4c (patch)
tree09513a17251be5bc8d132b8d00cbf2b893bcf57a /src/dispatcher.cpp
parentcb1b6fe32cbf3c7cf5961bb4156f2de743693a3a (diff)
different fixes to req/rep
Diffstat (limited to 'src/dispatcher.cpp')
-rw-r--r--src/dispatcher.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dispatcher.cpp b/src/dispatcher.cpp
index 5e7ea46..ef2f7c1 100644
--- a/src/dispatcher.cpp
+++ b/src/dispatcher.cpp
@@ -88,10 +88,6 @@ int zmq::dispatcher_t::term ()
zmq::dispatcher_t::~dispatcher_t ()
{
- // Close all application theads, sockets, io_objects etc.
- for (app_threads_t::size_type i = 0; i != app_threads.size (); i++)
- delete app_threads [i];
-
// Ask I/O threads to terminate. If stop signal wasn't sent to I/O
// thread subsequent invocation of destructor would hang-up.
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++)
@@ -101,6 +97,10 @@ zmq::dispatcher_t::~dispatcher_t ()
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++)
delete io_threads [i];
+ // Close all application theads, sockets, io_objects etc.
+ for (app_threads_t::size_type i = 0; i != app_threads.size (); i++)
+ delete app_threads [i];
+
// Deallocate all the orphaned pipes.
while (!pipes.empty ())
delete *pipes.begin ();