diff options
-rw-r--r-- | mitmproxy/protocol/http.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/protocol/http.py b/mitmproxy/protocol/http.py index 22e71422..56c5f9ea 100644 --- a/mitmproxy/protocol/http.py +++ b/mitmproxy/protocol/http.py @@ -231,7 +231,8 @@ class HttpLayer(Layer): six.reraise(ProtocolException, ProtocolException( "Error in HTTP connection: %s" % repr(e)), sys.exc_info()[2]) finally: - flow.live = False + if flow: + flow.live = False def get_request_from_client(self): request = self.read_request() |