Skip to content

Commit

Permalink
fix Python 3.6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Aug 13, 2020
1 parent 6788532 commit fc94bbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mitmproxy/addons/asgiapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def request(self, flow: http.HTTPFlow) -> None:
assert flow.reply
if (flow.request.pretty_host, flow.request.port) == (self.host, self.port) and not flow.reply.has_message:
flow.reply.take() # pause hook completion
asyncio.create_task(serve(self.asgi_app, flow))
asyncio.ensure_future(serve(self.asgi_app, flow))


class WSGIApp(ASGIApp):
Expand Down

0 comments on commit fc94bbd

Please sign in to comment.