Fixed missing isolation of packet delivery callback

This commit is contained in:
Mark Qvist 2023-05-10 18:40:46 +02:00
parent 1bd6020163
commit 7df11a6f67
1 changed files with 6 additions and 1 deletions

View File

@ -402,7 +402,12 @@ class PacketReceipt:
self.proof_packet = proof_packet
if self.callbacks.delivery != None:
try:
self.callbacks.delivery(self)
except Exception as e:
RNS.log("An error occurred while evaluating external delivery callback for "+str(link), RNS.LOG_ERROR)
RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR)
return True
else:
return False