Skip to content

Commit

Permalink
stop receiving notifications properly
Browse files Browse the repository at this point in the history
Under certain circunstances, the notifications goroutine entered into an
infinite loop.
  • Loading branch information
gustavo-iniguez-goya committed Jul 6, 2020
1 parent 3853d41 commit a5994b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon/ui/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

0 comments on commit a5994b0

Please sign in to comment.