diff options
Diffstat (limited to 'src/sync/mod.rs')
| -rw-r--r-- | src/sync/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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 { | |||
| 1184 | // Create relay connection | 1184 | // Create relay connection |
| 1185 | let connection = RelayConnection::new(relay_url.clone()); | 1185 | let connection = RelayConnection::new(relay_url.clone()); |
| 1186 | 1186 | ||
| 1187 | // Get connection timeout from health tracker (capped at base backoff) | ||
| 1188 | // This ensures the connection attempt completes before the next retry would be scheduled | ||
| 1189 | let connection_timeout_secs = self.health_tracker.base_backoff_secs(); | ||
| 1190 | |||
| 1187 | // Connect and subscribe to Layer 1 | 1191 | // Connect and subscribe to Layer 1 |
| 1188 | match connection.connect_and_subscribe(None).await { | 1192 | match connection.connect_and_subscribe(None, connection_timeout_secs).await { |
| 1189 | Ok(_) => { | 1193 | Ok(_) => { |
| 1190 | // Record successful connection attempt | 1194 | // Record successful connection attempt |
| 1191 | if let Some(ref metrics) = self.metrics { | 1195 | if let Some(ref metrics) = self.metrics { |