summaryrefslogtreecommitdiffstats
path: root/apps/s_socket.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2018-01-14 18:17:59 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2018-01-14 18:17:59 +0100
commit803141f6100ca8d756928328a262e1dc52daef2d (patch)
tree0742d618889d2cd453c0c0a1790595c7c914701d /apps/s_socket.c
parent26ec943e020c0db6a25e6d155ba318270eff0fd7 (diff)
Use constant value 1 instead of SHUT_WR in do_server
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5072)
Diffstat (limited to 'apps/s_socket.c')
-rw-r--r--apps/s_socket.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/s_socket.c b/apps/s_socket.c
index 2f3e90bbf9..246153a79b 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -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);