khatru: cancel existing subscription when a new one starts with the same id.
This commit is contained in:
@@ -290,6 +290,8 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
|
|||||||
ws.WriteJSON(resp)
|
ws.WriteJSON(resp)
|
||||||
|
|
||||||
case *nostr.ReqEnvelope:
|
case *nostr.ReqEnvelope:
|
||||||
|
rl.removeListenerId(ws, env.SubscriptionID)
|
||||||
|
|
||||||
eose := sync.WaitGroup{}
|
eose := sync.WaitGroup{}
|
||||||
eose.Add(len(env.Filters))
|
eose.Add(len(env.Filters))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user