aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol2/http_proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/protocol2/http_proxy.py')
-rw-r--r--libmproxy/protocol2/http_proxy.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmproxy/protocol2/http_proxy.py b/libmproxy/protocol2/http_proxy.py
index 19b5f7ef..652aa473 100644
--- a/libmproxy/protocol2/http_proxy.py
+++ b/libmproxy/protocol2/http_proxy.py
@@ -10,7 +10,8 @@ class HttpProxy(Layer, ServerConnectionMixin):
for message in layer():
if not self._handle_server_message(message):
yield message
-
+ if self.server_conn:
+ self._disconnect()
class HttpUpstreamProxy(Layer, ServerConnectionMixin):
def __init__(self, ctx, server_address):
@@ -21,3 +22,5 @@ class HttpUpstreamProxy(Layer, ServerConnectionMixin):
for message in layer():
if not self._handle_server_message(message):
yield message
+ if self.server_conn:
+ self._disconnect()