From a14f39f93a01300ef169b5650c3f4a0e40acc6e6 Mon Sep 17 00:00:00 2001 From: "Maciek \"mab122\" Bator" Date: Fri, 24 Apr 2026 12:44:22 +0200 Subject: [PATCH] fix: replace RNS.Link.FAILED with TIMEOUT and STALE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RNS.Link has no FAILED constant — the terminal non-ACTIVE states are CLOSED, TIMEOUT, and STALE. Co-Authored-By: Claude Sonnet 4.6 --- src/radicle_reticulum/bridge.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/radicle_reticulum/bridge.py b/src/radicle_reticulum/bridge.py index 57e113c..e649721 100644 --- a/src/radicle_reticulum/bridge.py +++ b/src/radicle_reticulum/bridge.py @@ -326,7 +326,7 @@ class RadicleBridge: link = RNS.Link(remote_dest) deadline = time.time() + half while link.status != RNS.Link.ACTIVE: - if link.status in (RNS.Link.CLOSED, RNS.Link.FAILED): + if link.status in (RNS.Link.CLOSED, RNS.Link.TIMEOUT, RNS.Link.STALE): return None if time.time() > deadline: return None @@ -494,9 +494,9 @@ class RadicleBridge: # Wait for link establishment (Noise XK handshake) deadline = time.time() + 30.0 while rns_link.status != RNS.Link.ACTIVE: - if rns_link.status in (RNS.Link.CLOSED, RNS.Link.FAILED): + if rns_link.status in (RNS.Link.CLOSED, RNS.Link.TIMEOUT, RNS.Link.STALE): RNS.log( - "Link closed/failed before becoming active", + "Link closed/timed out before becoming active", RNS.LOG_WARNING, ) tcp_socket.close()