Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/RNS/Transport.py b/RNS/Transport.py
- index 1453f78d..0af962da 100755
- --- a/RNS/Transport.py
- +++ b/RNS/Transport.py
- @@ -3119,9 +3119,20 @@ class Transport:
- return
- # Forward path request on all interfaces
- - # except the requestor interface
- + # except the requestor interface.
- + # The discovery timeout must also cover a full round trip for an MTU on the slowest interface
- + discovery_timeout = Transport.PATH_REQUEST_TIMEOUT
- + for interface in Transport.interfaces:
- + if search_mode_filter and not interface.mode in search_mode_filter: continue
- + if not interface.online or interface == attached_interface: continue
- + if interface.bitrate != None and interface.bitrate > 0:
- + medium_timeout = 2*(RNS.Reticulum.MTU*8/max(interface.bitrate, RNS.Reticulum.MINIMUM_BITRATE)) + Transport.PATH_REQUEST_GRACE
- + if medium_timeout > discovery_timeout: discovery_timeout = medium_timeout
- +
- RNS.log("Attempting to discover unknown path to "+RNS.prettyhexrep(destination_hash)+" on behalf of path request"+interface_str, RNS.LOG_PATHING) if RNS.sl(RNS.LOG_PATHING) else None
- - pr_entry = { "destination_hash": destination_hash, "timeout": time.time()+Transport.PATH_REQUEST_TIMEOUT, "requesting_interface": attached_interface }
- + pr_entry = { "destination_hash": destination_hash, "timeout": time.time()+discovery_timeout, "requesting_interface": attached_interface }
- with Transport.discovery_pr_lock: Transport.discovery_path_requests[destination_hash] = pr_entry
- for interface in Transport.interfaces:
Advertisement
Add Comment
Please, Sign In to add comment