diff --git a/src/sync/mod.rs b/src/sync/mod.rs index e3b990b..8736006 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -4450,7 +4450,7 @@ impl SyncManager { let mut relay_urls: Vec = targets .iter() .filter(|(relay_url, needs)| { - !needs.root_events.is_empty() + (!needs.repos.is_empty() || !needs.root_events.is_empty()) && states.get(*relay_url).is_some_and(|state| { matches!( state.connection_status, diff --git a/tests/sync/live_sync.rs b/tests/sync/live_sync.rs index 03bebf5..df0bbee 100644 --- a/tests/sync/live_sync.rs +++ b/tests/sync/live_sync.rs @@ -150,6 +150,7 @@ async fn test_live_sync_batches_repo_filters_below_source_req_limit() { wait_for_sync_connection(syncing.url(), 1, Duration::from_secs(5)) .await .expect("syncing relay should connect to constrained source"); + wait_for_new_descendant_live_generation(&syncing, 0, Duration::from_secs(20)).await; // Observe one q-tagged event completing the round trip before testing a // second live event. This proves the relevant subscription is installed