Commit f478c8a7 authored by Matt Caswell's avatar Matt Caswell
Browse files

Don't set TCP_NODELAY on a UDP socket



This was preventing DTLS connections from being made from the command line.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6159)
parent 66fab923
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;