This commit is contained in:
Mark Qvist 2025-04-17 13:31:00 +02:00
commit 005d71707c
2 changed files with 8 additions and 9 deletions

View file

@ -1,4 +1,5 @@
import time
import threading
import RNS
import RNS.vendor.umsgpack as msgpack
@ -17,10 +18,11 @@ class LXMFDeliveryAnnounceHandler:
if lxmessage.method == LXMessage.DIRECT or lxmessage.method == LXMessage.OPPORTUNISTIC:
lxmessage.next_delivery_attempt = time.time()
while self.lxmrouter.processing_outbound:
time.sleep(0.1)
def outbound_trigger():
while self.lxmrouter.processing_outbound: time.sleep(0.1)
self.lxmrouter.process_outbound()
self.lxmrouter.process_outbound()
threading.Thread(target=outbound_trigger, daemon=True).start()
try:
stamp_cost = stamp_cost_from_app_data(app_data)
@ -55,10 +57,8 @@ class LXMFPropagationAnnounceHandler:
pass
if len(data) >= 3:
try:
propagation_transfer_limit = float(data[2])
except:
propagation_transfer_limit = None
try: propagation_transfer_limit = float(data[2])
except: propagation_transfer_limit = None
if destination_hash in self.lxmrouter.static_peers:
self.lxmrouter.peer(destination_hash, node_timebase, propagation_transfer_limit, wanted_inbound_peers)