output is sent outside corking it may get delayed. */
o_stream_tcp_flush_via_nodelay(fstream);
}
+ if (!set && !fstream->no_socket_quickack) {
+ /* Uncorking - disable delayed ACKs to reduce latency.
+ Note that this needs to be set repeatedly. */
+ if (net_set_tcp_quickack(fstream->fd, TRUE) < 0)
+ fstream->no_socket_quickack = TRUE;
+ }
stream->corked = set;
}
}
if (S_ISREG(st.st_mode)) {
fstream->no_socket_cork = TRUE;
fstream->no_socket_nodelay = TRUE;
+ fstream->no_socket_quickack = TRUE;
fstream->file = TRUE;
}
}
fstream->no_sendfile = TRUE;
fstream->no_socket_cork = TRUE;
fstream->no_socket_nodelay = TRUE;
+ fstream->no_socket_quickack = TRUE;
} else if (local_ip.family == 0) {
/* UNIX domain socket */
fstream->no_socket_cork = TRUE;
fstream->no_socket_nodelay = TRUE;
+ fstream->no_socket_quickack = TRUE;
}
}