Without TCP_NODELAY alerts risk to be dropped between shutdown and close.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5887)
}
#endif
- if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai), 0)) {
+ if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai), BIO_SOCK_NODELAY)) {
BIO_closesocket(*sock);
*sock = INVALID_SOCKET;
continue;
BIO_closesocket(asock);
break;
}
+ BIO_set_tcp_ndelay(sock, 1);
i = (*cb)(sock, type, protocol, context);
/*