summaryrefslogtreecommitdiff
path: root/src/ctx.cpp
diff options
context:
space:
mode:
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);