From d2ef6e37047d1a321645a4e0417e6a02578a5499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 29 Mar 2022 22:12:43 +0200 Subject: [PATCH] Restored timeout --- tunnel-server/src/udstunnel.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tunnel-server/src/udstunnel.py b/tunnel-server/src/udstunnel.py index a0e54c49..9dab6556 100755 --- a/tunnel-server/src/udstunnel.py +++ b/tunnel-server/src/udstunnel.py @@ -109,7 +109,6 @@ async def tunnel_proc_async( if msg.command == message.Command.TUNNEL and msg.connection: # Connection done, check for handshake source, address = msg.connection - source.settimeout(3.0) try: # First, ensure handshake (simple handshake) and command @@ -229,7 +228,9 @@ def tunnel_main(): while not do_stop: try: client, addr = sock.accept() - logger.debug('ACCEPTED CONNECTION from %s (%s)', addr, client) + client.settimeout(3.0) + + logger.debug('CONNECTION from %s', addr) # Select BEST process for sending this new connection prcs.best_child().send( message.Message(message.Command.TUNNEL, (client, addr))