Treat WSA_IO_PENDING as a receive timeout
This commit is contained in:
parent
fb12361b3f
commit
be1a48e856
1 changed files with 6 additions and 0 deletions
|
|
@ -188,6 +188,12 @@ int recvUdpSocket(SOCKET s, char* buffer, int size, bool useSelect) {
|
||||||
(LastSocketError() == EWOULDBLOCK ||
|
(LastSocketError() == EWOULDBLOCK ||
|
||||||
LastSocketError() == EINTR ||
|
LastSocketError() == EINTR ||
|
||||||
LastSocketError() == EAGAIN ||
|
LastSocketError() == EAGAIN ||
|
||||||
|
#if defined(LC_WINDOWS)
|
||||||
|
// This error is specific to overlapped I/O which isn't even
|
||||||
|
// possible to perform with recvfrom(). It seems to randomly
|
||||||
|
// be returned instead of WSAETIMEDOUT on certain systems.
|
||||||
|
LastSocketError() == WSA_IO_PENDING ||
|
||||||
|
#endif
|
||||||
LastSocketError() == ETIMEDOUT)) {
|
LastSocketError() == ETIMEDOUT)) {
|
||||||
// Return 0 for timeout
|
// Return 0 for timeout
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue