From 5e21bdd233787742aa3120ed4e2baeebd6f8672d Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 16 Sep 2021 20:40:37 +0200 Subject: [PATCH] Improved link teardown handling. --- RNS/Link.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RNS/Link.py b/RNS/Link.py index 4e56d82..ed1261f 100644 --- a/RNS/Link.py +++ b/RNS/Link.py @@ -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)