Problem: wrong assertion macro used on Windows

Solution: use wsa_assert instead of errno_assert
This commit is contained in:
Simon Giesecke 2018-02-11 12:19:20 +01:00
parent 2f27bcd74b
commit 5873894c83

View File

@ -151,10 +151,14 @@ void zmq::poll_t::loop ()
// Wait for events. // Wait for events.
int rc = poll (&pollset[0], pollset.size (), timeout ? timeout : -1); int rc = poll (&pollset[0], pollset.size (), timeout ? timeout : -1);
#ifdef ZMQ_HAVE_WINDOWS
wsa_assert (rc != SOCKET_ERROR);
#else
if (rc == -1) { if (rc == -1) {
errno_assert (errno == EINTR); errno_assert (errno == EINTR);
continue; continue;
} }
#endif
// If there are no events (i.e. it's a timeout) there's no point // If there are no events (i.e. it's a timeout) there's no point
// in checking the pollset. // in checking the pollset.