mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
apps/s_socket.c: disable the Nagle algorithm.
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)
This commit is contained in:
parent
55fd5d3fc5
commit
dcf3d83faf
@ -146,7 +146,7 @@ int init_client(int *sock, const char *host, const char *port,
|
||||
}
|
||||
#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;
|
||||
@ -330,6 +330,7 @@ int do_server(int *accept_sock, const char *host, const char *port,
|
||||
BIO_closesocket(asock);
|
||||
break;
|
||||
}
|
||||
BIO_set_tcp_ndelay(sock, 1);
|
||||
i = (*cb)(sock, type, protocol, context);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user