proxy: Turn on TCP_NODELAY for the proxy->upstream leg
Nagle doesn't actually affect us too badly here, as we don't write the header and then the data in two separate calls under normal circumstances, which is the pathological case, but we should have NODELAY on, regardless
This commit is contained in:
@@ -186,6 +186,13 @@ void proxy_finish_connect_to_upstream( struct proxier *proxy, off64_t size ) {
|
||||
}
|
||||
|
||||
proxy->upstream_size = size;
|
||||
|
||||
if ( AF_UNIX != proxy->connect_to.family ) {
|
||||
if ( sock_set_tcp_nodelay( proxy->upstream_fd, 1 ) == -1 ) {
|
||||
warn( SHOW_ERRNO( "Failed to set TCP_NODELAY" ) );
|
||||
}
|
||||
}
|
||||
|
||||
info( "Connected to upstream on fd %i", proxy->upstream_fd );
|
||||
|
||||
return;
|
||||
|
Reference in New Issue
Block a user