diff options
Diffstat (limited to 'librabbitmq/amqp_socket.c')
-rw-r--r-- | librabbitmq/amqp_socket.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/librabbitmq/amqp_socket.c b/librabbitmq/amqp_socket.c index f4ecaeb..545f2cd 100644 --- a/librabbitmq/amqp_socket.c +++ b/librabbitmq/amqp_socket.c @@ -75,7 +75,6 @@ #ifdef _WIN32 # define poll(fdarray, nfds, timeout) WSAPoll(fdarray, nfds, timeout) -# define EINPROGRESS WSAEWOULDBLOCK #endif static int @@ -434,7 +433,11 @@ int amqp_open_socket_inner(char const *hostname, break; } +#ifdef _WIN32 + if (WSAEWOULDBLOCK == amqp_os_socket_error()) { +#else if (EINPROGRESS == amqp_os_socket_error()) { +#endif last_error = amqp_poll_write(sockfd, deadline); if (AMQP_STATUS_OK == last_error) { int result; |