From d39172b9b35230060da85cf03548d3e516a736c4 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 30 Jul 2020 14:13:55 +0200 Subject: main: Increase listen socket backlog size In environments with a larger number of devices, especially when these are connected at the time usbmuxd starts, there will be a lot of simultaneous connection attemps. With a backlog size of 5 these connection attempts will easily get a ECONNREFUSED thus failing to perform the required preflight operations. Increasing this to 256 will help to mitigate this. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index b935e80..28ca65a 100644 --- a/src/main.c +++ b/src/main.c @@ -105,7 +105,7 @@ static int create_socket(void) { } // Start listening - if (listen(listenfd, 5) != 0) { + if (listen(listenfd, 256) != 0) { usbmuxd_log(LL_FATAL, "listen() failed: %s", strerror(errno)); return -1; } -- cgit v1.1-32-gdbae