mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-11-22 15:36:30 +03:00
Fix stale sockets after WinError
This commit is contained in:
@@ -34,7 +34,7 @@ from .balancer import balancer
|
||||
from .pool import ws_pool, cf_worker_pool
|
||||
from .cf_h2 import CfH2Pool
|
||||
from .network_debug import log_ws_flow
|
||||
from .event_loop import install_self_pipe_guard
|
||||
from .event_loop import install_proactor_socket_guard, install_self_pipe_guard
|
||||
from ._aes import Cipher, algorithms, modes
|
||||
|
||||
|
||||
@@ -385,7 +385,9 @@ _client_tasks: Set[asyncio.Task] = set()
|
||||
|
||||
async def _run(stop_event: Optional[asyncio.Event] = None):
|
||||
global _server_instance, _server_stop_event, cf_h2_pool
|
||||
install_self_pipe_guard(asyncio.get_running_loop())
|
||||
loop = asyncio.get_running_loop()
|
||||
install_proactor_socket_guard(loop)
|
||||
install_self_pipe_guard(loop)
|
||||
_server_stop_event = stop_event
|
||||
|
||||
reset_tcp_backoff()
|
||||
|
||||
Reference in New Issue
Block a user