From 91f50ebb3f4cdabb97f83b062acf5d460ffc20ab Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sat, 28 Mar 2026 17:24:47 +0100 Subject: [PATCH] [fix](trx-rs): increase JSON line limit to 256KB for large sat pass responses GetSatPasses responses with 100+ satellites easily exceed the previous 16KB limit, causing the remote client to disconnect. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stan Grams --- src/trx-client/src/remote_client.rs | 2 +- .../trx-frontend/trx-frontend-http-json/src/server.rs | 2 +- src/trx-server/src/listener.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/trx-client/src/remote_client.rs b/src/trx-client/src/remote_client.rs index 7b4f89c..5a2e3fb 100644 --- a/src/trx-client/src/remote_client.rs +++ b/src/trx-client/src/remote_client.rs @@ -27,7 +27,7 @@ const DEFAULT_AUDIO_PORT: u16 = 4531; const CONNECT_TIMEOUT: Duration = Duration::from_secs(5); const IO_TIMEOUT: Duration = Duration::from_secs(15); const SPECTRUM_IO_TIMEOUT: Duration = Duration::from_secs(3); -const MAX_JSON_LINE_BYTES: usize = 16 * 1024; +const MAX_JSON_LINE_BYTES: usize = 256 * 1024; const MAX_CONSECUTIVE_POLL_FAILURES: u32 = 3; #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/src/trx-client/trx-frontend/trx-frontend-http-json/src/server.rs b/src/trx-client/trx-frontend/trx-frontend-http-json/src/server.rs index 08fc058..0f75561 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http-json/src/server.rs +++ b/src/trx-client/trx-frontend/trx-frontend-http-json/src/server.rs @@ -24,7 +24,7 @@ use trx_protocol::ClientResponse; const IO_TIMEOUT: Duration = Duration::from_secs(10); const REQUEST_TIMEOUT: Duration = Duration::from_secs(12); -const MAX_JSON_LINE_BYTES: usize = 16 * 1024; +const MAX_JSON_LINE_BYTES: usize = 256 * 1024; /// JSON-over-TCP frontend for control and status. pub struct HttpJsonFrontend; diff --git a/src/trx-server/src/listener.rs b/src/trx-server/src/listener.rs index f09f995..8e3405d 100644 --- a/src/trx-server/src/listener.rs +++ b/src/trx-server/src/listener.rs @@ -34,7 +34,7 @@ use crate::rig_handle::RigHandle; const IO_TIMEOUT: Duration = Duration::from_secs(10); const REQUEST_TIMEOUT: Duration = Duration::from_secs(12); -const MAX_JSON_LINE_BYTES: usize = 16 * 1024; +const MAX_JSON_LINE_BYTES: usize = 256 * 1024; /// Run the JSON TCP listener, accepting client connections. /// /// `rigs` is a shared map from rig_id → `RigHandle`. The first entry (by