aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2016-12-17 10:45:34 +0100
committerGitHub <noreply@github.com>2016-12-17 10:45:34 +0100
commit39a251a988579d3c58d0895c7aa396a03f51ef76 (patch)
treecb263cf1105bd4176cbc235ea01ed9a768ec44a2
parentfc724b664182195f9cf47dacd95afebc4fb00d87 (diff)
parent3eac72f1a317f0890f74cd26e5ab955dbc2303f2 (diff)
downloadmitmproxy-39a251a988579d3c58d0895c7aa396a03f51ef76.tar.gz
mitmproxy-39a251a988579d3c58d0895c7aa396a03f51ef76.tar.bz2
mitmproxy-39a251a988579d3c58d0895c7aa396a03f51ef76.zip
Merge pull request #1870 from Kriechi/http2-timeouts
http2: faster timeouts
-rw-r--r--mitmproxy/proxy/protocol/http2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/proxy/protocol/http2.py b/mitmproxy/proxy/protocol/http2.py
index 41707096..45e55955 100644
--- a/mitmproxy/proxy/protocol/http2.py
+++ b/mitmproxy/proxy/protocol/http2.py
@@ -328,7 +328,7 @@ class Http2Layer(base.Layer):
try:
while True:
- r = tcp.ssl_read_select(conns, 1)
+ r = tcp.ssl_read_select(conns, 0.1)
for conn in r:
source_conn = self.client_conn if conn == self.client_conn.connection else self.server_conn
other_conn = self.server_conn if conn == self.client_conn.connection else self.client_conn
@@ -580,7 +580,7 @@ class Http2SingleStreamLayer(httpbase._HttpTransmissionLayer, basethread.BaseThr
def read_response_body(self, request, response):
while True:
try:
- yield self.response_data_queue.get(timeout=1)
+ yield self.response_data_queue.get(timeout=0.1)
except queue.Empty: # pragma: no cover
pass
if self.response_data_finished.is_set():