Do not block removing clients if notification manager quit.

This commit is contained in:
Josh Rickmar 2014-03-04 11:31:44 -05:00
parent a7d5b365b1
commit 27f3d916ec

View file

@ -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