File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,7 @@ async def start_client(
425
425
"""
426
426
if self .is_duplicate_or_self_connection (target_node ):
427
427
self .log .warning (f"cannot connect to { target_node .host } , duplicate/self connection" )
428
+ print (f"cannot connect to { target_node .host } , duplicate/self connection" )
428
429
return False
429
430
430
431
if target_node .host in self .banned_peers and time .time () < self .banned_peers [target_node .host ]:
@@ -452,15 +453,19 @@ async def start_client(
452
453
)
453
454
except ServerDisconnectedError :
454
455
self .log .debug (f"Server disconnected error connecting to { url } . Perhaps we are banned by the peer." )
456
+ print (f"Server disconnected error connecting to { url } . Perhaps we are banned by the peer." )
455
457
return False
456
458
except ClientResponseError as e :
457
459
self .log .warning (f"Connection failed to { url } . Error: { e } " )
460
+ print (f"Connection failed to { url } . Error: { e } " )
458
461
return False
459
462
except asyncio .TimeoutError :
460
463
self .log .debug (f"Timeout error connecting to { url } " )
464
+ print (f"Timeout error connecting to { url } " )
461
465
return False
462
466
if ws is None :
463
467
self .log .warning (f"Connection failed to { url } . ws was None" )
468
+ print (f"Connection failed to { url } . ws was None" )
464
469
return False
465
470
466
471
ssl_object = ws .get_extra_info ("ssl_object" )
Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ def __init__(
149
149
async def _connect_peers_task_handler (self ) -> None :
150
150
resolved_peers : dict [UnresolvedPeerInfo , PeerInfo ] = {}
151
151
prefer_ipv6 = self .config .get ("prefer_ipv6" , False )
152
+ print (f"connect peers task started { self ._connect_peers } " )
152
153
while True :
153
154
for unresolved in self ._connect_peers :
154
155
print (f"try peer { unresolved } " )
@@ -164,15 +165,15 @@ async def _connect_peers_task_handler(self) -> None:
164
165
resolved_peers [unresolved ] = resolved
165
166
166
167
if any (connection .peer_info == resolved for connection in self ._server .all_connections .values ()):
167
- print ("step 1" )
168
+ print (f "step 1. { resolved } { self . _server . all_connections . values () } " )
168
169
continue
169
170
if any (
170
171
connection .peer_info .host == resolved .host and connection .peer_server_port == resolved .port
171
172
for connection in self ._server .all_connections .values ()
172
173
):
173
174
print ("step 2" )
174
175
continue
175
-
176
+ print ( f"connect to { resolved } " )
176
177
if not await self ._server .start_client (resolved , None ):
177
178
self ._log .info (f"Failed to connect to { resolved } " )
178
179
print (f"Failed to connect to { resolved } " )
You can’t perform that action at this time.
0 commit comments