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