From a5aeff31d7712bcc4417c632de9ee99b203ddbdb Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Mon, 4 May 2026 19:26:24 -0300 Subject: [PATCH] khatru: cancel existing subscription when a new one starts with the same id. --- khatru/handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/khatru/handlers.go b/khatru/handlers.go index e954413..5f9684d 100644 --- a/khatru/handlers.go +++ b/khatru/handlers.go @@ -290,6 +290,8 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) { ws.WriteJSON(resp) case *nostr.ReqEnvelope: + rl.removeListenerId(ws, env.SubscriptionID) + eose := sync.WaitGroup{} eose.Add(len(env.Filters))