aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/flow.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r--libmproxy/flow.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index 31b7bc51..c91dc14a 100644
--- a/libmproxy/flow.py
+++ b/libmproxy/flow.py
@@ -212,7 +212,8 @@ class State:
Replaces the matching connection object with a ReplayConnection object.
"""
conn = self.get_connection(f)
- del self.flow_map[conn]
+ if conn in self.flow_map:
+ del self.flow_map[conn]
f.revert()
self.flow_map[f.connection] = f