From 5af0fcff6cebbd3b30ce6a3734e1d84cc09d6793 Mon Sep 17 00:00:00 2001 From: Vangelis Banos Date: Wed, 17 Jan 2018 13:34:35 +0000 Subject: [PATCH] Use socket.TCP_NODELAY to improve performance Experiment details supporting this in Jira issue WWM-935 --- warcprox/mitmproxy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/warcprox/mitmproxy.py b/warcprox/mitmproxy.py index 130196a..dd08bf7 100644 --- a/warcprox/mitmproxy.py +++ b/warcprox/mitmproxy.py @@ -243,6 +243,7 @@ class MitmProxyHandler(http_server.BaseHTTPRequestHandler): port=self.onion_tor_socks_proxy_port, rdns=True) else: self._remote_server_sock = socket.socket() + self._remote_server_sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) # XXX what value should this timeout have? self._remote_server_sock.settimeout(60)