From 2bbb35b2f14b7e1df1f00e35b3a7c44ed9256af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Thu, 26 Feb 2026 09:06:49 -0600 Subject: [PATCH] Improve comment --- radicle-httpd/src/api/v1/node.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/radicle-httpd/src/api/v1/node.rs b/radicle-httpd/src/api/v1/node.rs index 602dc3091..45c115357 100644 --- a/radicle-httpd/src/api/v1/node.rs +++ b/radicle-httpd/src/api/v1/node.rs @@ -77,7 +77,9 @@ async fn node_handler(State(ctx): State) -> impl IntoResponse { .unwrap_or_default() .map(|node| node.agent); - // Work around /node endpoint being slow to respond. + // The call to `is_running` is a blocking call, which has been, anecdotally, slow to respond. + // Spawn a thread with a timeout to ensure that the call to `is_running` does not slow down the + // response of the `/node` route too much. let node_state = { let socket = ctx.profile.socket(); let is_running = timeout(