11.08., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

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: ...@@ -151,7 +151,7 @@ def asyncio_run(coroutine: Coroutine, loop=None) -> Any:
result = myloop.run_until_complete(coroutine) result = myloop.run_until_complete(coroutine)
if loop is None: if loop is None:
asyncio.set_event_loop(None) asyncio.set_event_loop(None)
myloop.run_until_complete(loop.shutdown_asyncgens()) myloop.run_until_complete(myloop.shutdown_asyncgens())
myloop.close() myloop.close()
return result return result
...@@ -416,7 +416,7 @@ class Server: ...@@ -416,7 +416,7 @@ class Server:
finally: finally:
if loop is None: if loop is None:
asyncio.set_event_loop(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.loop.close()
self.server.close() self.server.close()
asyncio_run(self.server.wait_closed()) 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