mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 00:46:05 +01:00
Don't assume SOCKET_ERROR is -1 on Windows
This commit is contained in:
parent
ac53f1a728
commit
d0b9005ef0
@ -292,7 +292,7 @@ int zmq::stream_engine_t::write (const void *data_, size_t size_)
|
||||
return 0;
|
||||
|
||||
// Signalise peer failure.
|
||||
if (nbytes == -1 && (
|
||||
if (nbytes == SOCKET_ERROR && (
|
||||
WSAGetLastError () == WSAENETDOWN ||
|
||||
WSAGetLastError () == WSAENETRESET ||
|
||||
WSAGetLastError () == WSAEHOSTUNREACH ||
|
||||
@ -338,7 +338,7 @@ int zmq::stream_engine_t::read (void *data_, size_t size_)
|
||||
return 0;
|
||||
|
||||
// Connection failure.
|
||||
if (nbytes == -1 && (
|
||||
if (nbytes == SOCKET_ERROR && (
|
||||
WSAGetLastError () == WSAENETDOWN ||
|
||||
WSAGetLastError () == WSAENETRESET ||
|
||||
WSAGetLastError () == WSAECONNABORTED ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user