Skip to content

Commit 9b3bdf5

Browse files
committed
Set TCP_NODELAY in all the listening sockets
Maybe this should help latency a bit? I don't have my testing setup anymore, so, eh.
1 parent 55ccf94 commit 9b3bdf5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/lwan-socket.c

+2
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ static int set_socket_options(const struct lwan *l, int fd)
245245
SET_SOCKET_OPTION(SOL_SOCKET, SO_LINGER,
246246
(&(struct linger){.l_onoff = 1, .l_linger = 1}));
247247

248+
SET_SOCKET_OPTION_MAY_FAIL(SOL_TCP, TCP_NODELAY, (int[]){1});
249+
248250
#ifdef __linux__
249251

250252
#ifndef TCP_FASTOPEN

0 commit comments

Comments
 (0)