close channel on client discard

This commit is contained in:
Gani Georgiev
2024-11-19 23:23:25 +02:00
parent d0795bd849
commit 34d7ac0808
3 changed files with 13 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ func (b *Broker) Register(client Client) {
b.store.Set(client.Id(), client)
}
// Unregister removes a single client by its id.
// Unregister removes a single client by its id and marks it as discarded.
//
// If client with clientId doesn't exist, this method does nothing.
func (b *Broker) Unregister(clientId string) {