From 5d9325793f7f5075947b84ff160d78211a53e0db Mon Sep 17 00:00:00 2001 From: Barry Deen Date: Wed, 11 Sep 2024 13:02:07 -0400 Subject: [PATCH] return when done, remose eose --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index f17f521..2a2ecec 100644 --- a/main.go +++ b/main.go @@ -323,7 +323,7 @@ func archiveTrustedNotes(relay *khatru.Relay, ctx context.Context) { trustNetworkFilterMu.Lock() defer trustNetworkFilterMu.Unlock() - for ev := range pool.SubManyEose(timeout, seedRelays, filters) { + for ev := range pool.SubMany(timeout, seedRelays, filters) { select { case <-ctx.Done(): log.Println("⏰ Archive process terminated due to timeout") @@ -344,4 +344,5 @@ func archiveTrustedNotes(relay *khatru.Relay, ctx context.Context) { } log.Println("📦 archived", trustedNotes, "trusted notes and discarded", untrustedNotes, "untrusted notes") + return }