mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-08-10 08:13:18 +03:00
MacOS moved to tkinter and pystray; cetifi implementation to fix SSL issues
This commit is contained in:
@@ -323,6 +323,17 @@ def _run_proxy_thread(show_error: Callable[[str], None]) -> None:
|
||||
if diagnose_called:
|
||||
diagnose_called()
|
||||
finally:
|
||||
pending = [
|
||||
task for task in asyncio.all_tasks(loop)
|
||||
if not task.done()
|
||||
]
|
||||
for task in pending:
|
||||
task.cancel()
|
||||
if pending:
|
||||
loop.run_until_complete(asyncio.gather(
|
||||
*pending, return_exceptions=True
|
||||
))
|
||||
loop.run_until_complete(loop.shutdown_asyncgens())
|
||||
loop.close()
|
||||
_async_stop = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user