Skip to content

Commit 7a52665

Browse files
committed
Merge bitcoin/bitcoin#31239: test: clarify log messages when handling SOCKS5 proxy connections
99d9a09 test: clarify log messages when handling SOCKS5 proxy connections (Vasil Dimov) Pull request description: Clarify log messages when handling SOCKS5 proxy connections. Suggested in bitcoin/bitcoin#29420 (comment) ACKs for top commit: mzumsande: Code Review ACK 99d9a09 tdb3: code review ACK 99d9a09 Tree-SHA512: 06bc0e63fbc9fdd8144a161d65d02e6c99565960064e65782b9b4b2fdfdf18539a1cd9513e17a911eef1506525e411e8422b7b805ce4c2392fcca6620112e172
2 parents 900b172 + 99d9a09 commit 7a52665

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/functional/test_framework/socks5.py

Lines changed: 4 additions & 2 deletions
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)