From a5994b0c4f5c2ef4291651c205c1e5d5bca50398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20I=C3=B1iguez=20Goia?= Date: Mon, 6 Jul 2020 18:49:58 +0200 Subject: [PATCH] stop receiving notifications properly Under certain circunstances, the notifications goroutine entered into an infinite loop. --- daemon/ui/notifications.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/ui/notifications.go b/daemon/ui/notifications.go index 9bdbeea218..1755afd8fe 100644 --- a/daemon/ui/notifications.go +++ b/daemon/ui/notifications.go @@ -179,15 +179,15 @@ func (c *Client) listenForNotifications() { noti, err := notisStream.Recv() if err == io.EOF { log.Warning("notification channel closed by the server") - break + goto Exit } if err != nil { log.Error("getting notifications: ", err, noti) - break + goto Exit } c.handleNotification(notisStream, noti) } - +Exit: notisStream.CloseSend() log.Info("Stop receiving notifications") }