mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-10-25 18:40:17 -04:00
Link: fix resource cancellation
Resource.cancel() -> Link.cancel_{incoming/outgoing}_resource()
changes the iterated list and every second resource is skipped.
Fix: iterate over copies of the two lists
This commit is contained in:
parent
6c1182c2c2
commit
72ba27d63c
1 changed files with 2 additions and 2 deletions
|
|
@ -683,8 +683,8 @@ class Link:
|
|||
except Exception as e: pass
|
||||
|
||||
def link_closed(self):
|
||||
for resource in self.incoming_resources: resource.cancel()
|
||||
for resource in self.outgoing_resources: resource.cancel()
|
||||
for resource in self.incoming_resources.copy(): resource.cancel()
|
||||
for resource in self.outgoing_resources.copy(): resource.cancel()
|
||||
if self._channel: self._channel._shutdown()
|
||||
|
||||
self.prv = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue