From 99d9a093cf6d53b24d4a48f5845e0e0299f47800 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 7 Nov 2024 14:20:59 +0100 Subject: [PATCH] test: clarify log messages when handling SOCKS5 proxy connections Co-authored-by: Martin Zumsande --- test/functional/test_framework/socks5.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/functional/test_framework/socks5.py b/test/functional/test_framework/socks5.py index 3387c8a1fef..28be5a0f55e 100644 --- a/test/functional/test_framework/socks5.py +++ b/test/functional/test_framework/socks5.py @@ -183,9 +183,9 @@ def handle(self): with socket.create_connection((dest["actual_to_addr"], dest["actual_to_port"])) as conn_to: forward_sockets(self.conn, conn_to) else: - logger.debug(f"Closing connection to {requested_to}: the destinations factory returned None") + logger.debug(f"Can't serve the connection to {requested_to}: the destinations factory returned None") else: - logger.debug(f"Closing connection to {requested_to}: no destinations factory") + logger.debug(f"Can't serve the connection to {requested_to}: no destinations factory") # Fall through to disconnect except Exception as e: @@ -194,6 +194,8 @@ def handle(self): finally: if not self.serv.keep_alive: self.conn.close() + else: + logger.debug(f"Keeping client connection alive") class Socks5Server(): def __init__(self, conf):