From f6b1190eba4c3ec39d54a30dc528485a14b2ff3e Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Wed, 18 Nov 2026 20:28:50 -0700 Subject: [PATCH] rnpath: print the request line only once the remote link is up, as upstream does --- crates/rns-tools/src/commands/rnpath.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/rns-tools/src/commands/rnpath.rs b/crates/rns-tools/src/commands/rnpath.rs index 0a36995..d10fae5 100644 --- a/crates/rns-tools/src/commands/rnpath.rs +++ b/crates/rns-tools/src/commands/rnpath.rs @@ -1293,10 +1293,8 @@ async fn remote_query( ) -> Result, ExitCode> { print!("{OUTPUT_RST}Establishing link with remote transport instance... "); flush(); - print!("{OUTPUT_RST}Sending request... "); - flush(); let client = LinkClient::new(handle.transport_tx.clone(), identity); - match client + let result = client .query( transport_hash, app, @@ -1305,8 +1303,13 @@ async fn remote_query( REMOTE_HOPS, REMOTE_LINK_TIMEOUT, ) - .await - { + .await; + // Upstream prints this once the link is up, so not after a link failure. + if matches!(result, Ok(_) | Err(LinkClientError::RequestFailed(_))) { + print!("{OUTPUT_RST}Sending request... "); + flush(); + } + match result { // A timed-out receipt has no response; callers report it as a failed request. Err(LinkClientError::RequestFailed(RequestFailure::TimedOut)) => Ok(Vec::new()), // Upstream's link-closed callback prints, but its exit() runs off the