network.stop: fix await

This commit is contained in:
SomberNight 2018-10-20 23:17:10 +02:00
parent c47533f6cf
commit 637e65efe3
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -829,7 +829,7 @@ class Network(PrintError):
async def _stop(self, full_shutdown=False):
self.print_error("stopping network")
try:
asyncio.wait_for(await self.main_taskgroup.cancel_remaining(), timeout=2)
await asyncio.wait_for(self.main_taskgroup.cancel_remaining(), timeout=2)
except asyncio.TimeoutError: pass
self.main_taskgroup = None