diff --git a/socketft.cpp b/socketft.cpp index fcf56f44..97f370bd 100644 --- a/socketft.cpp +++ b/socketft.cpp @@ -397,6 +397,7 @@ bool SocketReceiver::Receive(byte* buf, size_t bufLen) { default: m_s.CheckAndHandleError_int("WSARecv", SOCKET_ERROR); + // Fall through for non-fatal case WSAEDISCON: m_lastResult = 0; m_eofReceived = true; @@ -432,6 +433,7 @@ unsigned int SocketReceiver::GetReceiveResult() { default: m_s.CheckAndHandleError("WSAGetOverlappedResult", FALSE); + // Fall through for non-fatal case WSAEDISCON: m_lastResult = 0; m_eofReceived = true; diff --git a/winpipes.cpp b/winpipes.cpp index eb1d5711..3c25e84b 100644 --- a/winpipes.cpp +++ b/winpipes.cpp @@ -114,6 +114,7 @@ bool WindowsPipeReceiver::Receive(byte* buf, size_t bufLen) { default: CheckAndHandleError("ReadFile", false); + // Fall through for non-fatal case ERROR_BROKEN_PIPE: case ERROR_HANDLE_EOF: m_lastResult = 0; @@ -154,6 +155,7 @@ unsigned int WindowsPipeReceiver::GetReceiveResult() { default: CheckAndHandleError("GetOverlappedResult", false); + // Fall through for non-fatal case ERROR_BROKEN_PIPE: case ERROR_HANDLE_EOF: m_lastResult = 0;