khatru: cancel existing subscription when a new one starts with the same id.

This commit is contained in:
fiatjaf
2026-05-04 19:26:24 -03:00
parent bf7998e780
commit a5aeff31d7
+2
View File
@@ -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))