summaryrefslogtreecommitdiff
path: root/src/ctx.cpp
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2011-09-08 16:38:46 +0200
committerMartin Lucina <martin@lucina.net>2012-01-23 08:54:16 +0100
commit88f712b4a31c95caef4f34c4ec65793c392314a6 (patch)
tree2f17936ce9d53b1b13908e8d4288846aaa604263 /src/ctx.cpp
parentad3e013f74d309b86e8f087932203e5787fe2d2d (diff)
parent75af6aed482ab16997c1388fe801f74d11ec12a4 (diff)
Imported Debian patch 2.1.9-1debian/2.1.9-1
Diffstat (limited to 'src/ctx.cpp')
-rw-r--r--src/ctx.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp
index 2758729..9612cd1 100644
--- a/src/ctx.cpp
+++ b/src/ctx.cpp
@@ -18,21 +18,23 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "platform.hpp"
+#if defined ZMQ_HAVE_WINDOWS
+#include "windows.hpp"
+#endif
+
#include <new>
#include <string.h>
#include "ctx.hpp"
#include "socket_base.hpp"
#include "io_thread.hpp"
-#include "platform.hpp"
#include "reaper.hpp"
#include "err.hpp"
#include "pipe.hpp"
-#if defined ZMQ_HAVE_WINDOWS
-#include "windows.h"
-#else
-#include "unistd.h"
+#if !defined ZMQ_HAVE_WINDOWS
+#include <unistd.h>
#endif
zmq::ctx_t::ctx_t (uint32_t io_threads_) :
@@ -141,7 +143,7 @@ int zmq::ctx_t::terminate ()
// Wait till reaper thread closes all the sockets.
command_t cmd;
- int rc = term_mailbox.recv (&cmd, true);
+ int rc = term_mailbox.recv (&cmd, -1);
if (rc == -1 && errno == EINTR)
return -1;
zmq_assert (rc == 0);