diff options
author | 2020-07-30 14:13:55 +0200 | |
---|---|---|
committer | 2020-07-30 14:13:55 +0200 | |
commit | d39172b9b35230060da85cf03548d3e516a736c4 (patch) | |
tree | 70fcc21aa7487b9eec68c514710ec1d5d7850ee5 /src/main.c | |
parent | e2cd81c05f26fa243be4acf316d2e8766427f2ce (diff) | |
download | usbmuxd-d39172b9b35230060da85cf03548d3e516a736c4.tar.gz usbmuxd-d39172b9b35230060da85cf03548d3e516a736c4.tar.bz2 |
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.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -105,7 +105,7 @@ static int create_socket(void) { | |||
105 | } | 105 | } |
106 | 106 | ||
107 | // Start listening | 107 | // Start listening |
108 | if (listen(listenfd, 5) != 0) { | 108 | if (listen(listenfd, 256) != 0) { |
109 | usbmuxd_log(LL_FATAL, "listen() failed: %s", strerror(errno)); | 109 | usbmuxd_log(LL_FATAL, "listen() failed: %s", strerror(errno)); |
110 | return -1; | 110 | return -1; |
111 | } | 111 | } |