From a07415783b5181e49156fab1fb8dc893b87db792 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 6 Apr 2018 09:22:01 +1200 Subject: [PATCH] Remove socket listen backlog constraint I have no idea why we did this, but the default value is 128, and setting it this low drops connections under conditions our users can reasonably be expeted to reach. --- mitmproxy/net/tcp.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mitmproxy/net/tcp.py b/mitmproxy/net/tcp.py index 62783023e..b842f11f2 100644 --- a/mitmproxy/net/tcp.py +++ b/mitmproxy/net/tcp.py @@ -547,7 +547,6 @@ class Counter: class TCPServer: - request_queue_size = 20 def __init__(self, address): self.address = address @@ -580,7 +579,7 @@ class TCPServer: self.socket.bind(self.address) self.address = self.socket.getsockname() - self.socket.listen(self.request_queue_size) + self.socket.listen() self.handler_counter = Counter() def connection_thread(self, connection, client_address):