Use constant value 1 instead of SHUT_WR in do_server
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 14 Jan 2018 17:17:59 +0000 (18:17 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 14 Jan 2018 17:17:59 +0000 (18:17 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5072)

apps/s_socket.c

index 2f3e90bbf97a2eb07bb6d9ea6ac3ac2131243481..246153a79bba77c7bb305f7d6beec3e737060819 100644 (file)
@@ -231,13 +231,7 @@ int do_server(int *accept_sock, const char *host, const char *port,
              * and then closing the socket sends TCP-FIN first followed by
              * TCP-RST. This seems to allow the peer to read the alert data.
              */
-#ifdef _WIN32
-# ifdef SD_SEND
-            shutdown(sock, SD_SEND);
-# endif
-#elif defined(SHUT_WR)
-            shutdown(sock, SHUT_WR);
-#endif
+            shutdown(sock, 1); /* SHUT_WR */
             BIO_closesocket(sock);
         } else {
             i = (*cb)(asock, type, protocol, context);