From 7c814d71ba3da27dd431848a82c8ae19408cc472 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Wed, 4 Apr 2018 13:26:47 -0700 Subject: [PATCH] close all remote connections at shutdown to avoid hang --- warcprox/warcproxy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/warcprox/warcproxy.py b/warcprox/warcproxy.py index 2f63a77..b6a0943 100644 --- a/warcprox/warcproxy.py +++ b/warcprox/warcproxy.py @@ -483,6 +483,7 @@ class WarcProxy(SingleThreadedWarcProxy, warcprox.mitmproxy.PooledMitmProxy): def server_close(self): self.logger.info('shutting down') http_server.HTTPServer.server_close(self) + self.remote_connection_pool.clear() def handle_error(self, request, client_address): self.logger.warn(