Skip to content

Commit

Permalink
enhancement: close channel before deleting the client
Browse files Browse the repository at this point in the history
  • Loading branch information
leonsteinhaeuser committed Apr 13, 2022
1 parent 21b02b2 commit 6567b13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func (o *Observer[t]) deleteClient(uid string) error {
if _, ok := o.clients[uid]; !ok {
return ErrClientAlreadyDeRegistered
}
close(o.clients[uid])
delete(o.clients, uid)
return nil
}
Expand Down

0 comments on commit 6567b13

Please sign in to comment.