Fixed medium_timeout init

This commit is contained in:
Mark Qvist 2026-08-20 08:38:09 +02:00
parent 68cda4a855
commit 9ae3db169e
No known key found for this signature in database

View file

@ -3294,7 +3294,7 @@ class Transport:
# except the requestor interface. The discovery
# timeout must also cover a full round trip for
# an MTU on the slowest online interface.
if not Transport.lowest_interface_bitrate: medium_timeout = None
if not Transport.lowest_interface_bitrate: medium_timeout = 0
else: medium_timeout = 2*(RNS.Reticulum.MTU*8/max(Transport.lowest_interface_bitrate, RNS.Reticulum.MINIMUM_BITRATE)) + RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT
discovery_timeout = max(Transport.PATH_REQUEST_TIMEOUT, medium_timeout)