From a6ed7bced0a0daa35c2f71509bba4805f4a1df63 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 9 Feb 2025 20:46:53 -0300 Subject: [PATCH] do not cancel subscription context on eose, only on subscription close. --- handlers.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/handlers.go b/handlers.go index 4168ac3..9ac9e09 100644 --- a/handlers.go +++ b/handlers.go @@ -305,10 +305,8 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) { } go func() { - // when all events have been loaded from databases and dispatched - // we can cancel the context and fire the EOSE message + // when all events have been loaded from databases and dispatched we can fire the EOSE message eose.Wait() - cancelReqCtx(nil) ws.WriteJSON(nostr.EOSEEnvelope(env.SubscriptionID)) }() case *nostr.CloseEnvelope: