mirror of
https://github.com/markqvist/LXMF
synced 2026-11-22 23:10:36 +00:00
Added outbound processing trigger for pn node announces
This commit is contained in:
1 parent
6a00d82b28
commit
a8505eade9
2 files changed
+13
-1
No files matched your search
@@ -41,6 +41,18 @@ class LXMFPropagationAnnounceHandler:
|
||||
def received_announce(self, destination_hash, announced_identity, app_data, announce_packet_hash, is_path_response):
|
||||
try:
|
||||
if type(app_data) == bytes:
|
||||
if destination_hash == self.lxmrouter.get_outbound_propagation_node():
|
||||
if pn_announce_data_is_valid(app_data):
|
||||
for lxmessage in self.lxmrouter.pending_outbound:
|
||||
if lxmessage.method == LXMessage.PROPAGATED:
|
||||
lxmessage.next_delivery_attempt = time.time()
|
||||
|
||||
def outbound_trigger():
|
||||
while self.lxmrouter.outbound_processing_lock.locked(): time.sleep(0.1)
|
||||
self.lxmrouter.process_outbound()
|
||||
|
||||
threading.Thread(target=outbound_trigger, daemon=True).start()
|
||||
|
||||
if self.lxmrouter.propagation_node:
|
||||
if pn_announce_data_is_valid(app_data):
|
||||
data = msgpack.unpackb(app_data)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
__version__ = "0.9.7"
|
||||
__version__ = "0.9.8"
|
||||
Reference in new issue
Block a user