Improved link teardown handling.

This commit is contained in:
Mark Qvist 2021-09-16 20:40:37 +02:00
parent c7e5f4612a
commit 5e21bdd233
1 changed files with 5 additions and 0 deletions

View File

@ -419,6 +419,11 @@ class Link:
self.shared_key = None
self.derived_key = None
if self.destination != None:
if self.destination.direction == RNS.Destination.IN:
if self in self.destination.links:
self.destination.links.remove(self)
if self.callbacks.link_closed != None:
self.callbacks.link_closed(self)