mirror of
https://github.com/bitvora/wot-relay.git
synced 2025-06-06 18:31:05 +00:00
return when done, remose eose
This commit is contained in:
parent
f1ff8bb6bb
commit
5d9325793f
3
main.go
3
main.go
@ -323,7 +323,7 @@ func archiveTrustedNotes(relay *khatru.Relay, ctx context.Context) {
|
|||||||
trustNetworkFilterMu.Lock()
|
trustNetworkFilterMu.Lock()
|
||||||
defer trustNetworkFilterMu.Unlock()
|
defer trustNetworkFilterMu.Unlock()
|
||||||
|
|
||||||
for ev := range pool.SubManyEose(timeout, seedRelays, filters) {
|
for ev := range pool.SubMany(timeout, seedRelays, filters) {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
log.Println("⏰ Archive process terminated due to timeout")
|
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")
|
log.Println("📦 archived", trustedNotes, "trusted notes and discarded", untrustedNotes, "untrusted notes")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user