mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00:00
Transport job callback in thread
This commit is contained in:
parent
f02715bced
commit
540bde4cd4
@ -144,6 +144,7 @@ class RNodeInterface(Interface):
|
|||||||
if (self.validateRadioState()):
|
if (self.validateRadioState()):
|
||||||
self.interface_ready = True
|
self.interface_ready = True
|
||||||
RNS.log(str(self)+" is configured and powered up")
|
RNS.log(str(self)+" is configured and powered up")
|
||||||
|
sleep(1.0)
|
||||||
else:
|
else:
|
||||||
RNS.log("After configuring "+str(self)+", the actual radio parameters did not match your configuration.", RNS.LOG_ERROR)
|
RNS.log("After configuring "+str(self)+", the actual radio parameters did not match your configuration.", RNS.LOG_ERROR)
|
||||||
RNS.log("Make sure that your hardware actually supports the parameters specified in the configuration", RNS.LOG_ERROR)
|
RNS.log("Make sure that your hardware actually supports the parameters specified in the configuration", RNS.LOG_ERROR)
|
||||||
|
@ -74,7 +74,9 @@ class Transport:
|
|||||||
# Process receipts list for timed-out packets
|
# Process receipts list for timed-out packets
|
||||||
if Transport.receipts_last_checked+Transport.receipts_check_interval < time.time():
|
if Transport.receipts_last_checked+Transport.receipts_check_interval < time.time():
|
||||||
for receipt in Transport.receipts:
|
for receipt in Transport.receipts:
|
||||||
receipt.check_timeout()
|
thread = threading.Thread(target=receipt.check_timeout)
|
||||||
|
thread.setDaemon(True)
|
||||||
|
thread.start()
|
||||||
if receipt.status != RNS.PacketReceipt.SENT:
|
if receipt.status != RNS.PacketReceipt.SENT:
|
||||||
Transport.receipts.remove(receipt)
|
Transport.receipts.remove(receipt)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user