Commit 3de3ea94 authored by eckhart's avatar eckhart

- server.py: bugfix python3.5 compatibility

parent 667dd4df
......@@ -151,7 +151,7 @@ def asyncio_run(coroutine: Coroutine, loop=None) -> Any:
result = myloop.run_until_complete(coroutine)
if loop is None:
asyncio.set_event_loop(None)
myloop.run_until_complete(loop.shutdown_asyncgens())
myloop.run_until_complete(myloop.shutdown_asyncgens())
myloop.close()
return result
......@@ -416,7 +416,7 @@ class Server:
finally:
if loop is None:
asyncio.set_event_loop(None)
self.loop.run_until_complete(loop.shutdown_asyncgens())
self.loop.run_until_complete(self.loop.shutdown_asyncgens())
self.loop.close()
self.server.close()
asyncio_run(self.server.wait_closed())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment