From 75af6aed482ab16997c1388fe801f74d11ec12a4 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:54:14 +0100 Subject: Imported Upstream version 2.1.9 --- src/ctx.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ctx.cpp') 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 . */ +#include "platform.hpp" +#if defined ZMQ_HAVE_WINDOWS +#include "windows.hpp" +#endif + #include #include #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 #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); -- cgit v1.2.3