mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00: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,
|
# TODO: This should not be hardcoded,
|
||||||
# but calculated from something like
|
# but calculated from something like
|
||||||
# first-hop RTT latency and distance
|
# first-hop RTT latency and distance
|
||||||
DEFAULT_TIMEOUT = 10.0
|
DEFAULT_TIMEOUT = 15.0
|
||||||
TIMEOUT_FACTOR = 5
|
TIMEOUT_FACTOR = 3
|
||||||
KEEPALIVE = 120
|
KEEPALIVE = 120
|
||||||
|
|
||||||
PENDING = 0x00
|
PENDING = 0x00
|
||||||
@ -225,7 +225,7 @@ class Link:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def teardown(self):
|
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 = RNS.Packet(self, self.link_id, context=RNS.Packet.LINKCLOSE)
|
||||||
teardown_packet.send()
|
teardown_packet.send()
|
||||||
self.status = Link.CLOSED
|
self.status = Link.CLOSED
|
||||||
|
Loading…
Reference in New Issue
Block a user