Skip to content

Commit 99d9a09

Browse files
vasildmzumsande
andcommitted
test: clarify log messages when handling SOCKS5 proxy connections
Co-authored-by: Martin Zumsande <[email protected]>
1 parent c9e67e2 commit 99d9a09

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/functional/test_framework/socks5.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ def handle(self):
183183
with socket.create_connection((dest["actual_to_addr"], dest["actual_to_port"])) as conn_to:
184184
forward_sockets(self.conn, conn_to)
185185
else:
186-
logger.debug(f"Closing connection to {requested_to}: the destinations factory returned None")
186+
logger.debug(f"Can't serve the connection to {requested_to}: the destinations factory returned None")
187187
else:
188-
logger.debug(f"Closing connection to {requested_to}: no destinations factory")
188+
logger.debug(f"Can't serve the connection to {requested_to}: no destinations factory")
189189

190190
# Fall through to disconnect
191191
except Exception as e:
@@ -194,6 +194,8 @@ def handle(self):
194194
finally:
195195
if not self.serv.keep_alive:
196196
self.conn.close()
197+
else:
198+
logger.debug(f"Keeping client connection alive")
197199

198200
class Socks5Server():
199201
def __init__(self, conf):

0 commit comments

Comments
 (0)