Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#31239: test: clarify log messages when handling…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
fanquake committed Nov 11, 2024
2 parents 900b172 + 99d9a09 commit 7a52665
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/functional/test_framework/socks5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand Down

0 comments on commit 7a52665

Please sign in to comment.