windows-rx-wsaeconnreset-20060216
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 16 Feb 2006 21:48:50 +0000 (21:48 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 16 Feb 2006 21:48:50 +0000 (21:48 +0000)
Deal with the fact that Windows returns WSAECONNRESET after an ICMP
port not reachable packet was returned in response to a packet previously
sent.

src/rx/rx_xmit_nt.c

index 336ea5b..53129b7 100644 (file)
@@ -81,7 +81,7 @@ recvmsg(osi_socket socket, struct msghdr *msgP, int flags)
 #ifdef AFS_NT40_ENV
        if (code == SOCKET_ERROR)
            code = WSAGetLastError();
-       if (code == WSAEWOULDBLOCK)
+       if (code == WSAEWOULDBLOCK || code == WSAECONNRESET)
            errno = WSAEWOULDBLOCK;
        else
            errno = EIO;
@@ -137,6 +137,7 @@ sendmsg(osi_socket socket, struct msghdr *msgP, int flags)
            errno = 0;
            break;
        case WSAEWOULDBLOCK:
+       case WSAECONNRESET:
            errno = WSAEWOULDBLOCK;
            break;
        case WSAEHOSTUNREACH: