aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/proxy
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2018-03-31 19:50:36 +1300
committerAldo Cortesi <aldo@corte.si>2018-04-01 09:46:32 +1200
commitb6d943cfa3a226651e705ff45aa7154010ea29ba (patch)
treebc8aabd32dba9fefcace1bb0d943f8a71f50ba54 /mitmproxy/proxy
parent54170ee6572e8ba38b94a4e51f3c8e832e5f9ac7 (diff)
downloadmitmproxy-b6d943cfa3a226651e705ff45aa7154010ea29ba.tar.gz
mitmproxy-b6d943cfa3a226651e705ff45aa7154010ea29ba.tar.bz2
mitmproxy-b6d943cfa3a226651e705ff45aa7154010ea29ba.zip
asyncio: fix client replay
Diffstat (limited to 'mitmproxy/proxy')
-rw-r--r--mitmproxy/proxy/protocol/http_replay.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/mitmproxy/proxy/protocol/http_replay.py b/mitmproxy/proxy/protocol/http_replay.py
index 8682f50e..b2cca2b1 100644
--- a/mitmproxy/proxy/protocol/http_replay.py
+++ b/mitmproxy/proxy/protocol/http_replay.py
@@ -1,8 +1,3 @@
-import asyncio
-import queue
-import threading
-import typing
-
from mitmproxy import log
from mitmproxy import controller
from mitmproxy import exceptions
@@ -26,21 +21,12 @@ class RequestReplayThread(basethread.BaseThread):
self,
opts: options.Options,
f: http.HTTPFlow,
- loop: asyncio.AbstractEventLoop,
- event_queue: typing.Optional[queue.Queue],
- should_exit: threading.Event
+ channel: controller.Channel,
) -> None:
- """
- event_queue can be a queue or None, if no scripthooks should be
- processed.
- """
self.options = opts
self.f = f
f.live = True
- if event_queue:
- self.channel = controller.Channel(loop, event_queue)
- else:
- self.channel = None
+ self.channel = channel
super().__init__(
"RequestReplay (%s)" % f.request.url
)