From 435b0ec24be892ee06b74df5cd1dde4bd43a493e Mon Sep 17 00:00:00 2001 From: Vangelis Banos Date: Tue, 6 Mar 2018 09:58:56 +0000 Subject: [PATCH] Address unit test failure in Python 3.4 --- warcprox/mitmproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warcprox/mitmproxy.py b/warcprox/mitmproxy.py index c75c1e2..9d076e3 100644 --- a/warcprox/mitmproxy.py +++ b/warcprox/mitmproxy.py @@ -250,7 +250,7 @@ class MitmProxyHandler(http_server.BaseHTTPRequestHandler): pool_kwargs={'maxsize': 100}) self._remote_server_conn = self._conn_pool._get_conn() - if self._remote_server_conn.sock is None: + if is_connection_dropped(self._remote_server_conn): if self.onion_tor_socks_proxy_host and self.hostname.endswith('.onion'): self.logger.info( "using tor socks proxy at %s:%s to connect to %s",