mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-14 10:10:13 +00:00
Improved link timeout handling.
This commit is contained in:
parent
f87a6a57df
commit
32e4c262ef
@ -47,7 +47,7 @@ class Link:
|
|||||||
|
|
||||||
# This value is set at a reasonable
|
# This value is set at a reasonable
|
||||||
# level for a 1 Kb/s channel.
|
# level for a 1 Kb/s channel.
|
||||||
ESTABLISHMENT_TIMEOUT_PER_HOP = 20
|
ESTABLISHMENT_TIMEOUT_PER_HOP = 5
|
||||||
"""
|
"""
|
||||||
Default timeout for link establishment in seconds per hop to destination.
|
Default timeout for link establishment in seconds per hop to destination.
|
||||||
"""
|
"""
|
||||||
@ -446,7 +446,11 @@ class Link:
|
|||||||
next_check = self.request_time + self.establishment_timeout
|
next_check = self.request_time + self.establishment_timeout
|
||||||
sleep_time = next_check - time.time()
|
sleep_time = next_check - time.time()
|
||||||
if time.time() >= self.request_time + self.establishment_timeout:
|
if time.time() >= self.request_time + self.establishment_timeout:
|
||||||
RNS.log("Timeout waiting for RTT packet from link initiator", RNS.LOG_DEBUG)
|
if self.initiator:
|
||||||
|
RNS.log("Timeout waiting link request proof", RNS.LOG_DEBUG)
|
||||||
|
else:
|
||||||
|
RNS.log("Timeout waiting for RTT packet from link initiator", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
self.status = Link.CLOSED
|
self.status = Link.CLOSED
|
||||||
self.teardown_reason = Link.TIMEOUT
|
self.teardown_reason = Link.TIMEOUT
|
||||||
self.link_closed()
|
self.link_closed()
|
||||||
|
Loading…
Reference in New Issue
Block a user