mirror of
https://github.com/markqvist/LXMF.git
synced 2025-05-22 15:51:44 -04:00
Cleanup
This commit is contained in:
parent
1bdcf6ad53
commit
005d71707c
2 changed files with 8 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
|||
import time
|
||||
import threading
|
||||
import RNS
|
||||
import RNS.vendor.umsgpack as msgpack
|
||||
|
||||
|
@ -17,11 +18,12 @@ 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()
|
||||
|
||||
threading.Thread(target=outbound_trigger, daemon=True).start()
|
||||
|
||||
try:
|
||||
stamp_cost = stamp_cost_from_app_data(app_data)
|
||||
self.lxmrouter.update_stamp_cost(destination_hash, stamp_cost)
|
||||
|
@ -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)
|
||||
|
|
|
@ -2301,8 +2301,7 @@ class LXMRouter:
|
|||
else:
|
||||
RNS.log("Outbound processing for "+str(lxmessage)+" to "+RNS.prettyhexrep(lxmessage.get_destination().hash), RNS.LOG_DEBUG)
|
||||
|
||||
if lxmessage.progress == None or lxmessage.progress < 0.01:
|
||||
lxmessage.progress = 0.01
|
||||
if lxmessage.progress == None or lxmessage.progress < 0.01: lxmessage.progress = 0.01
|
||||
|
||||
# Outbound handling for opportunistic messages
|
||||
if lxmessage.method == LXMessage.OPPORTUNISTIC:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue