Fix winsock shutdown call
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Fri, 5 Feb 2016 16:43:50 +0000 (18:43 +0200)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Fri, 5 Feb 2016 16:43:50 +0000 (18:43 +0200)
tftp.c

diff --git a/tftp.c b/tftp.c
index 2c71b71cdca626d2d409ff4f23f8b781dd7d4b59..1f7d6116d433f56c6acc8800c54e0f45bf78d391 100644 (file)
--- a/tftp.c
+++ b/tftp.c
@@ -296,10 +296,11 @@ cleanup:
        }
 
        if (sock >= 0) {
-               shutdown(sock, SHUT_RDWR);
 #ifndef NMRPFLASH_WINDOWS
+               shutdown(sock, SHUT_RDWR);
                close(sock);
 #else
+               shutdown(sock, SD_BOTH);
                closesocket(sock);
 #endif
        }