mirror of
https://github.com/aljazceru/khatru.git
synced 2026-01-26 16:34:20 +01:00
fix bug when removing key from listenership.
This commit is contained in:
@@ -37,6 +37,11 @@ func unwatchPubKey(excludedKey string, ws *websocket.Conn) {
|
||||
if existingWs == ws {
|
||||
continue
|
||||
}
|
||||
if i == len(wss) {
|
||||
// if we reach this point it is because the key we were
|
||||
// excluding wasn't here in the first place
|
||||
return
|
||||
}
|
||||
newWss[i] = existingWs
|
||||
i++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user