Added outbound processing trigger for pn node announces
This commit is contained in:
parent
6a00d82b28
commit
a8505eade9
2 changed files with 13 additions and 1 deletions
|
|
@ -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 @@
|
|||
__version__ = "0.9.7"
|
||||
__version__ = "0.9.8"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue