Transport job callback in thread

This commit is contained in:
Mark Qvist 2018-04-26 11:29:21 +02:00
parent f02715bced
commit 540bde4cd4
2 changed files with 4 additions and 1 deletions

View File

@ -144,6 +144,7 @@ class RNodeInterface(Interface):
if (self.validateRadioState()):
self.interface_ready = True
RNS.log(str(self)+" is configured and powered up")
sleep(1.0)
else:
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)

View File

@ -74,7 +74,9 @@ class Transport:
# Process receipts list for timed-out packets
if Transport.receipts_last_checked+Transport.receipts_check_interval < time.time():
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:
Transport.receipts.remove(receipt)