diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp index a23c1c12e29..2d462726662 100644 --- a/extra/yassl/src/socket_wrapper.cpp +++ b/extra/yassl/src/socket_wrapper.cpp @@ -45,10 +45,12 @@ const int SOCKET_EINVAL = WSAEINVAL; const int SOCKET_EWOULDBLOCK = WSAEWOULDBLOCK; const int SOCKET_EAGAIN = WSAEWOULDBLOCK; + const int SOCKET_EINTR = WSAEINTR; #else const int SOCKET_EINVAL = EINVAL; const int SOCKET_EWOULDBLOCK = EWOULDBLOCK; const int SOCKET_EAGAIN = EAGAIN; + const int SOCKET_EINTR = EINTR; #endif // _WIN32 @@ -184,7 +186,8 @@ uint Socket::receive(byte* buf, unsigned int sz) // idea to seperate error from would block by arnetheduck@gmail.com if (recvd == -1) { if (get_lastError() == SOCKET_EWOULDBLOCK || - get_lastError() == SOCKET_EAGAIN) { + get_lastError() == SOCKET_EAGAIN || + get_lastError() == SOCKET_EINTR) { wouldBlock_ = true; // would have blocked this time only nonBlocking_ = true; // socket nonblocking, win32 only way to tell return 0;