Do not block removing clients if notification manager quit.
This commit is contained in:
parent
a7d5b365b1
commit
27f3d916ec
1 changed files with 4 additions and 1 deletions
|
@ -741,7 +741,10 @@ func (m *wsNotificationManager) AddClient(wsc *wsClient) {
|
|||
// RemoveClient removes the passed websocket client and all notifications
|
||||
// registered for it.
|
||||
func (m *wsNotificationManager) RemoveClient(wsc *wsClient) {
|
||||
m.queueNotification <- (*notificationUnregisterClient)(wsc)
|
||||
select {
|
||||
case m.queueNotification <- (*notificationUnregisterClient)(wsc):
|
||||
case <-m.quit:
|
||||
}
|
||||
}
|
||||
|
||||
// Start starts the goroutines required for the manager to queue and process
|
||||
|
|
Loading…
Reference in a new issue