@@ -65,7 +65,7 @@ class Transport:
65
65
66
66
PATH_REQUEST_TIMEOUT = 15 # Default timuout for client path requests in seconds
67
67
PATH_REQUEST_GRACE = 0.4 # Grace time before a path announcement is made, allows directly reachable peers to respond first
68
- PATH_REQUEST_RG = 1.0 # Extra grace time for roaming-mode interfaces to allow more suitable peers to respond first
68
+ PATH_REQUEST_RG = 0.6 # Extra grace time for roaming-mode interfaces to allow more suitable peers to respond first
69
69
PATH_REQUEST_MI = 20 # Minimum interval in seconds for automated path requests
70
70
71
71
STATE_UNKNOWN = 0x00
@@ -2175,6 +2175,7 @@ def mark_path_unknown_state(destination_hash):
2175
2175
else :
2176
2176
return False
2177
2177
2178
+ @staticmethod
2178
2179
def path_is_unresponsive (destination_hash ):
2179
2180
if destination_hash in Transport .path_states :
2180
2181
if Transport .path_states [destination_hash ] == Transport .STATE_UNRESPONSIVE :
@@ -2339,14 +2340,18 @@ def path_request(destination_hash, is_from_local_client, attached_interface, req
2339
2340
if is_from_local_client :
2340
2341
retransmit_timeout = now
2341
2342
else :
2342
- # TODO: Consider this timing
2343
- retransmit_timeout = now + Transport .PATH_REQUEST_GRACE # + (RNS.rand() * Transport.PATHFINDER_RW)
2344
-
2345
- # If we are answering on a roaming-mode interface, wait a
2346
- # little longer, to allow potential more well-connected
2347
- # peers to answer first.
2348
- if attached_interface .mode == RNS .Interfaces .Interface .Interface .MODE_ROAMING :
2349
- retransmit_timeout += Transport .PATH_REQUEST_RG
2343
+ if Transport .is_local_client_interface (Transport .next_hop_interface (destination_hash )):
2344
+ RNS .log ("Path request destination " + RNS .prettyhexrep (destination_hash )+ " is on a local client interface, rebroadcasting immediately" , RNS .LOG_EXTREME )
2345
+ retransmit_timeout = now
2346
+
2347
+ else :
2348
+ retransmit_timeout = now + Transport .PATH_REQUEST_GRACE
2349
+
2350
+ # If we are answering on a roaming-mode interface, wait a
2351
+ # little longer, to allow potential more well-connected
2352
+ # peers to answer first.
2353
+ if attached_interface .mode == RNS .Interfaces .Interface .Interface .MODE_ROAMING :
2354
+ retransmit_timeout += Transport .PATH_REQUEST_RG
2350
2355
2351
2356
# This handles an edge case where a peer sends a past
2352
2357
# request for a destination just after an announce for
0 commit comments