khatru: fix eose waitgroup count for multiple filters.

This commit is contained in:
fiatjaf
2025-07-15 13:14:59 -03:00
parent 6592319774
commit 840e2846ed

View File

@@ -273,7 +273,7 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
case *nostr.ReqEnvelope:
eose := sync.WaitGroup{}
eose.Add(1)
eose.Add(len(env.Filters))
// a context just for the "stored events" request handler
reqCtx, cancelReqCtx := context.WithCancelCause(ctx)