mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-14 07:13:09 +00:00
cancel all tasks on exit
This commit is contained in:
@@ -1365,7 +1365,8 @@ def main():
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
stats_printer_task.cancel()
|
||||
for task in asyncio.Task.all_tasks():
|
||||
task.cancel()
|
||||
|
||||
if config.LISTEN_ADDR_IPV4:
|
||||
server_v4.close()
|
||||
|
||||
Reference in New Issue
Block a user