Commit 6712ba93 authored by Matt Caswell's avatar Matt Caswell
Browse files

Only set TCP_NODELAY if the protocol is TCP



This doesn't apply if we're doing DTLS, or using UNIX domain sockets.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6373)
parent bceae201
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ int init_client(int *sock, const char *host, const char *port,
#endif

        if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai),
                         type == SOCK_STREAM ? BIO_SOCK_NODELAY : 0)) {
                         protocol == IPPROTO_TCP ? BIO_SOCK_NODELAY : 0)) {
            BIO_closesocket(*sock);
            *sock = INVALID_SOCKET;
            continue;