From 2a8b7042994cbf1ab1acce49ce00528249c2ec01 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 29 May 2024 07:51:48 -0300 Subject: [PATCH] returning a nil chan from QueryEvents causes an immediate eose from that source. --- responding.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/responding.go b/responding.go index 3a9c3aa..bb72cb6 100644 --- a/responding.go +++ b/responding.go @@ -41,6 +41,9 @@ func (rl *Relay) handleRequest(ctx context.Context, id string, eose *sync.WaitGr ws.WriteJSON(nostr.NoticeEnvelope(err.Error())) eose.Done() continue + } else if ch == nil { + eose.Done() + continue } go func(ch chan *nostr.Event) {