mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-11-19 14:36:34 -05:00
Always init announce_queue
This commit is contained in:
parent
3ac3236b2f
commit
7852f53a4c
2 changed files with 4 additions and 3 deletions
|
|
@ -148,6 +148,7 @@ class Interface:
|
|||
self.ic_held_release_interval = RNS.Reticulum.get_instance()._default_ic_held_release_interval()
|
||||
self.ec_pr_freq = RNS.Reticulum.get_instance()._default_ec_pr_freq()
|
||||
self.egress_control = RNS.Reticulum.get_instance()._default_egress_control()
|
||||
self.announce_queue = []
|
||||
self.held_announces = {}
|
||||
self.transmit_buffer = None
|
||||
|
||||
|
|
@ -408,10 +409,12 @@ class Interface:
|
|||
return hz
|
||||
|
||||
def process_announce_queue(self):
|
||||
if not self.announce_queue: return
|
||||
|
||||
if not hasattr(self, "announce_cap"):
|
||||
self.announce_cap = RNS.Reticulum.ANNOUNCE_CAP/100.0
|
||||
|
||||
if hasattr(self, "announce_queue"):
|
||||
if self.announce_queue:
|
||||
try:
|
||||
now = time.time()
|
||||
stale = []
|
||||
|
|
|
|||
|
|
@ -1764,7 +1764,6 @@ class Transport:
|
|||
|
||||
if not hasattr(interface, "announce_cap"): interface.announce_cap = RNS.Reticulum.ANNOUNCE_CAP/100.0
|
||||
if not hasattr(interface, "announce_allowed_at"): interface.announce_allowed_at = 0
|
||||
if not hasattr(interface, "announce_queue"): interface.announce_queue = []
|
||||
|
||||
queued_announces = True if len(interface.announce_queue) > 0 else False
|
||||
if not queued_announces and outbound_time > interface.announce_allowed_at and interface.bitrate != None and interface.bitrate != 0:
|
||||
|
|
@ -3738,7 +3737,6 @@ class Transport:
|
|||
if on_interface != None and recursive:
|
||||
if not hasattr(on_interface, "announce_cap"): on_interface.announce_cap = RNS.Reticulum.ANNOUNCE_CAP/100.0
|
||||
if not hasattr(on_interface, "announce_allowed_at"): on_interface.announce_allowed_at = 0
|
||||
if not hasattr(on_interface, "announce_queue"): on_interface.announce_queue = []
|
||||
|
||||
queued_announces = True if len(on_interface.announce_queue) > 0 else False
|
||||
if queued_announces:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue