From f478c8a7c0229feb9f446df68e9940e8782edd91 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 2 May 2018 16:08:27 +0100 Subject: [PATCH] Don't set TCP_NODELAY on a UDP socket This was preventing DTLS connections from being made from the command line. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6159) --- apps/s_socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/s_socket.c b/apps/s_socket.c index 69f0f4f05e..d16108c706 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -146,7 +146,8 @@ int init_client(int *sock, const char *host, const char *port, } #endif - if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai), BIO_SOCK_NODELAY)) { + if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai), + type == SOCK_STREAM ? BIO_SOCK_NODELAY : 0)) { BIO_closesocket(*sock); *sock = INVALID_SOCKET; continue; -- 2.25.1