From 912d0b102073b71dd2bfe3f88bd3555a322a6b59 Mon Sep 17 00:00:00 2001 From: Pieter Mees Date: Sun, 18 Mar 2018 19:07:28 +0100 Subject: [PATCH] Set default backlog size to 511 Match Node's default backlog of 511 sockets (see https://nodejs.org/dist/latest-v9.x/docs/api/net.html#net_server_listen) This helps address https://github.com/mafintosh/turbo-net/issues/8 and https://github.com/mafintosh/turbo-http/issues/12 --- src/turbo_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/turbo_net.c b/src/turbo_net.c index f72da89..2d38326 100644 --- a/src/turbo_net.c +++ b/src/turbo_net.c @@ -187,7 +187,7 @@ NAPI_METHOD(turbo_net_tcp_listen) { )) // TODO: research backlog - NAPI_UV_THROWS(err, uv_listen(TURBO_NET_STREAM, 5, on_uv_connection)); + NAPI_UV_THROWS(err, uv_listen(TURBO_NET_STREAM, 511, on_uv_connection)); return NULL; }