mirror of
https://github.com/maubot/maubot
synced 2025-09-07 22:00:39 +00:00
Stop passing loop to asyncio.gather
This commit is contained in:
parent
09108f6a73
commit
03a1fdaaf5
2 changed files with 4 additions and 6 deletions
|
@ -73,13 +73,12 @@ try:
|
|||
log.info("Starting server")
|
||||
loop.run_until_complete(server.start())
|
||||
log.info("Starting clients and plugins")
|
||||
loop.run_until_complete(asyncio.gather(*[client.start() for client in clients], loop=loop))
|
||||
loop.run_until_complete(asyncio.gather(*[client.start() for client in clients]))
|
||||
log.info("Startup actions complete, running forever")
|
||||
loop.run_forever()
|
||||
except KeyboardInterrupt:
|
||||
log.info("Interrupt received, stopping clients")
|
||||
loop.run_until_complete(asyncio.gather(*[client.stop() for client in Client.cache.values()],
|
||||
loop=loop))
|
||||
loop.run_until_complete(asyncio.gather(*[client.stop() for client in Client.cache.values()]))
|
||||
if stop_log_listener is not None:
|
||||
log.debug("Closing websockets")
|
||||
loop.run_until_complete(stop_log_listener())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue