From 7196e445cab5049ef9fa5c9cce6043be0946f579 Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Fri, 5 Feb 2016 18:43:50 +0200 Subject: [PATCH] Fix winsock shutdown call --- tftp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tftp.c b/tftp.c index 2c71b71..1f7d611 100644 --- 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 } -- 2.25.1