diff --git a/pkg/morph/client/client.go b/pkg/morph/client/client.go index dd5ad73fc..4119c7dd7 100644 --- a/pkg/morph/client/client.go +++ b/pkg/morph/client/client.go @@ -579,10 +579,9 @@ func (c *Client) NotificationChannel() <-chan client.Notification { // - inactiveModeCb is called if not nil. func (c *Client) inactiveMode() { c.switchLock.Lock() - defer c.switchLock.Unlock() - close(c.notifications) c.inactive = true + c.switchLock.Unlock() if c.cfg.inactiveModeCb != nil { c.cfg.inactiveModeCb()