mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-30 01:00:18 +00:00
Fixed timeout calculation condition.
This commit is contained in:
parent
4bbf1ae57d
commit
62d954d7bf
@ -120,8 +120,6 @@ class Link:
|
|||||||
self.rx = 0
|
self.rx = 0
|
||||||
self.txbytes = 0
|
self.txbytes = 0
|
||||||
self.rxbytes = 0
|
self.rxbytes = 0
|
||||||
self.establishment_timeout = Link.ESTABLISHMENT_TIMEOUT_PER_HOP * max(1, RNS.Transport.hops_to(destination.hash))
|
|
||||||
RNS.log("Establishment timeout set to: "+str(self.establishment_timeout))
|
|
||||||
self.traffic_timeout_factor = Link.TRAFFIC_TIMEOUT_FACTOR
|
self.traffic_timeout_factor = Link.TRAFFIC_TIMEOUT_FACTOR
|
||||||
self.keepalive_timeout_factor = Link.KEEPALIVE_TIMEOUT_FACTOR
|
self.keepalive_timeout_factor = Link.KEEPALIVE_TIMEOUT_FACTOR
|
||||||
self.keepalive = Link.KEEPALIVE
|
self.keepalive = Link.KEEPALIVE
|
||||||
@ -139,6 +137,7 @@ class Link:
|
|||||||
self.sig_prv = self.owner.identity.sig_prv
|
self.sig_prv = self.owner.identity.sig_prv
|
||||||
else:
|
else:
|
||||||
self.initiator = True
|
self.initiator = True
|
||||||
|
self.establishment_timeout = Link.ESTABLISHMENT_TIMEOUT_PER_HOP * max(1, RNS.Transport.hops_to(destination.hash))
|
||||||
self.prv = X25519PrivateKey.generate()
|
self.prv = X25519PrivateKey.generate()
|
||||||
self.sig_prv = Ed25519PrivateKey.generate()
|
self.sig_prv = Ed25519PrivateKey.generate()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user