diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-04-04 15:47:01 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-04 15:47:01 +1200 |
commit | 780cd989d52e80df58411a4a0090ea8be6b58bd2 (patch) | |
tree | 76fc7c67e33cb526ea66cd6852f15a208dac3f79 /mitmproxy/tools/web/master.py | |
parent | 60a320fde8f049f709fe99a302c7e9932bdf53d2 (diff) | |
parent | 659fceb697054d28e427c3a1169e07c210049159 (diff) | |
download | mitmproxy-780cd989d52e80df58411a4a0090ea8be6b58bd2.tar.gz mitmproxy-780cd989d52e80df58411a4a0090ea8be6b58bd2.tar.bz2 mitmproxy-780cd989d52e80df58411a4a0090ea8be6b58bd2.zip |
Merge pull request #3029 from cortesi/eventloop
shift core event loop to asyncio
Diffstat (limited to 'mitmproxy/tools/web/master.py')
-rw-r--r-- | mitmproxy/tools/web/master.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mitmproxy/tools/web/master.py b/mitmproxy/tools/web/master.py index 4c597f0e..b7eddcce 100644 --- a/mitmproxy/tools/web/master.py +++ b/mitmproxy/tools/web/master.py @@ -2,6 +2,8 @@ import webbrowser import tornado.httpserver import tornado.ioloop +from tornado.platform.asyncio import AsyncIOMainLoop + from mitmproxy import addons from mitmproxy import log from mitmproxy import master @@ -102,6 +104,7 @@ class WebMaster(master.Master): ) def run(self): # pragma: no cover + AsyncIOMainLoop().install() iol = tornado.ioloop.IOLoop.instance() @@ -109,7 +112,6 @@ class WebMaster(master.Master): http_server.listen(self.options.web_port, self.options.web_iface) iol.add_callback(self.start) - tornado.ioloop.PeriodicCallback(lambda: self.tick(timeout=0), 5).start() web_url = "http://{}:{}/".format(self.options.web_iface, self.options.web_port) self.add_log( |