mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-08-06 13:34:43 -04:00
Fixed race condition for link initiators on timed out link establishment
This commit is contained in:
parent
97f97eb063
commit
bab779a34c
3 changed files with 49 additions and 38 deletions
|
@ -1741,6 +1741,8 @@ class Transport:
|
|||
def activate_link(link):
|
||||
RNS.log("Activating link "+str(link), RNS.LOG_EXTREME)
|
||||
if link in Transport.pending_links:
|
||||
if link.status != Link.PENDING:
|
||||
raise IOError("Invalid link state for link activation")
|
||||
Transport.pending_links.remove(link)
|
||||
Transport.active_links.append(link)
|
||||
link.status = RNS.Link.ACTIVE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue