fix(trx-client): increase command timeouts for slow CAT responses

This commit is contained in:
2026-02-25 23:40:56 +01:00
parent 47cff3f927
commit b7073e9104
3 changed files with 26 additions and 38 deletions
@@ -27,6 +27,7 @@ const FAVICON_BYTES: &[u8] = include_bytes!(concat!(
));
const LOGO_BYTES: &[u8] =
include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/trx-logo.png"));
const REQUEST_TIMEOUT: Duration = Duration::from_secs(15);
#[get("/status")]
pub async fn status_api(
@@ -714,7 +715,7 @@ async fn send_command(
actix_web::error::ErrorInternalServerError(format!("failed to send to rig: {e:?}"))
})?;
let resp = tokio::time::timeout(Duration::from_secs(8), resp_rx)
let resp = tokio::time::timeout(REQUEST_TIMEOUT, resp_rx)
.await
.map_err(|_| actix_web::error::ErrorGatewayTimeout("rig response timeout"))?;