mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-29 02:58:11 -07:00
File transfer example
This commit is contained in:
+3
-3
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user