mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-10-01 03:15:44 -04:00
File transfer example
This commit is contained in:
parent
aa9d0876d7
commit
4e136eea03
@ -29,8 +29,8 @@ class Link:
|
||||
# TODO: This should not be hardcoded,
|
||||
# but calculated from something like
|
||||
# first-hop RTT latency and distance
|
||||
DEFAULT_TIMEOUT = 10.0
|
||||
TIMEOUT_FACTOR = 5
|
||||
DEFAULT_TIMEOUT = 15.0
|
||||
TIMEOUT_FACTOR = 3
|
||||
KEEPALIVE = 120
|
||||
|
||||
PENDING = 0x00
|
||||
@ -225,7 +225,7 @@ class Link:
|
||||
return None
|
||||
|
||||
def teardown(self):
|
||||
if self.status != Link.PENDING:
|
||||
if self.status != Link.PENDING and self.status != Link.CLOSED:
|
||||
teardown_packet = RNS.Packet(self, self.link_id, context=RNS.Packet.LINKCLOSE)
|
||||
teardown_packet.send()
|
||||
self.status = Link.CLOSED
|
||||
|
Loading…
Reference in New Issue
Block a user