fix Python 3.6 compatibility

This commit is contained in:
Maximilian Hils 2020-08-13 17:19:56 +02:00
parent 67885320c0
commit fc94bbdabc

View file

@ -28,7 +28,7 @@ class ASGIApp:
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):