From 00026a185b4b48d7179d02b50ea9e1802cd7e7e4 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 19 Dec 2025 12:03:09 +0000 Subject: fix: prevent CLOSED messages from terminating relay connections The system was incorrectly treating subscription-specific CLOSED messages as connection-wide disconnects, causing live subscriptions to be terminated immediately after historic_sync completed. Two bugs fixed: 1. relay_connection.rs: Removed break on RelayMessage::Closed - it's subscription-specific, not connection-wide 2. mod.rs: Removed disconnect handling for RelayEvent::Closed - only log at DEBUG level and continue All 41 sync tests now pass including previously failing live sync tests. --- src/sync/relay_connection.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sync/relay_connection.rs') diff --git a/src/sync/relay_connection.rs b/src/sync/relay_connection.rs index bc4b59e..fdb32cb 100644 --- a/src/sync/relay_connection.rs +++ b/src/sync/relay_connection.rs @@ -256,7 +256,8 @@ impl RelayConnection { tracing::info!(relay = %url, message = %msg, "Relay closed subscription"); let _ = event_sender.send(RelayEvent::Closed(msg.to_string())).await; - break; + // Don't break - CLOSED is subscription-specific, not connection-specific + // The event loop should continue running for other active subscriptions } _ => {} }, -- cgit v1.2.3