diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/stream_engine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 45a6af6..b0f9f20 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -347,7 +347,7 @@ int xs::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 || @@ -397,7 +397,7 @@ int xs::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 || |