perf: use TCP_NODELAY for client sockets

(work with @vphantom)
This commit is contained in:
Simon Cruanes 2023-08-04 09:43:03 -04:00
parent 832c4bd4df
commit 6070b36955
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -930,6 +930,7 @@ module Unix_tcp_server_ = struct
Sem_.acquire 1 self.sem_max_connections;
try
let client_sock, _ = Unix.accept sock in
Unix.setsockopt client_sock Unix.TCP_NODELAY true;
self.new_thread (fun () ->
try
handle_client_unix_ client_sock;