Skip to content

Commit

Permalink
do not send unsubscribe on shutdown (#198)
Browse files Browse the repository at this point in the history
this will allow to reliably unsubscribe clients when
sending unsubscribe command via HTTP API. All unsubscribe
events will be fired on client side anyway as soon as
client disconnected.
  • Loading branch information
FZambia authored Nov 29, 2017
1 parent 50804ee commit c301eb1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions libcentrifugo/conns/hubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ func (h *clientHub) Shutdown() error {
sem <- struct{}{}
go func(cc ClientConn) {
defer func() { <-sem }()
for _, ch := range cc.Channels() {
cc.Unsubscribe(ch)
}
cc.Close(advice)
wg.Done()
}(cc)
Expand Down

0 comments on commit c301eb1

Please sign in to comment.