Deal with the fact that Windows returns WSAECONNRESET after an ICMP
port not reachable packet was returned in response to a packet previously
sent.
(cherry picked from commit
e1f4dd1c26a1fedb637ed754644f8c141fa4c0db)
#ifdef AFS_NT40_ENV
if (code == SOCKET_ERROR)
code = WSAGetLastError();
- if (code == WSAEWOULDBLOCK)
+ if (code == WSAEWOULDBLOCK || code == WSAECONNRESET)
errno = WSAEWOULDBLOCK;
else
errno = EIO;
errno = 0;
break;
case WSAEWOULDBLOCK:
+ case WSAECONNRESET:
errno = WSAEWOULDBLOCK;
break;
case WSAEHOSTUNREACH: