From 4941490233a728bc7c64fa80a53d15f772a1219f Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 11 Dec 2025 11:57:36 +0000 Subject: sync: add sync_base_backoff_secs config for better testing --- src/sync/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/sync/mod.rs') diff --git a/src/sync/mod.rs b/src/sync/mod.rs index 16ad833..21f31df 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -1184,8 +1184,12 @@ impl SyncManager { // Create relay connection let connection = RelayConnection::new(relay_url.clone()); + // Get connection timeout from health tracker (capped at base backoff) + // This ensures the connection attempt completes before the next retry would be scheduled + let connection_timeout_secs = self.health_tracker.base_backoff_secs(); + // Connect and subscribe to Layer 1 - match connection.connect_and_subscribe(None).await { + match connection.connect_and_subscribe(None, connection_timeout_secs).await { Ok(_) => { // Record successful connection attempt if let Some(ref metrics) = self.metrics { -- cgit v1.2.3