mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00:00
Fix exceptions on Channel shutdown
This commit is contained in:
parent
72300cc821
commit
9963cf37b8
@ -507,12 +507,14 @@ class LinkChannelOutlet(ChannelOutletBase):
|
|||||||
def inner(receipt: RNS.PacketReceipt):
|
def inner(receipt: RNS.PacketReceipt):
|
||||||
callback(packet)
|
callback(packet)
|
||||||
|
|
||||||
|
if packet and packet.receipt:
|
||||||
packet.receipt.set_timeout_callback(inner if callback else None)
|
packet.receipt.set_timeout_callback(inner if callback else None)
|
||||||
|
|
||||||
def set_packet_delivered_callback(self, packet: RNS.Packet, callback: Callable[[RNS.Packet], None] | None):
|
def set_packet_delivered_callback(self, packet: RNS.Packet, callback: Callable[[RNS.Packet], None] | None):
|
||||||
def inner(receipt: RNS.PacketReceipt):
|
def inner(receipt: RNS.PacketReceipt):
|
||||||
callback(packet)
|
callback(packet)
|
||||||
|
|
||||||
|
if packet and packet.receipt:
|
||||||
packet.receipt.set_delivery_callback(inner if callback else None)
|
packet.receipt.set_delivery_callback(inner if callback else None)
|
||||||
|
|
||||||
def get_packet_id(self, packet: RNS.Packet) -> any:
|
def get_packet_id(self, packet: RNS.Packet) -> any:
|
||||||
|
Loading…
Reference in New Issue
Block a user