File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -389,16 +389,20 @@ func (c *Client) listenForNotifications() {
389389 case <- c .clientCtx .Done ():
390390 goto Exit
391391 default :
392- noti , err := c .streamNotifications .Recv ()
392+ ntf , err := c .streamNotifications .Recv ()
393393 if err == io .EOF {
394394 log .Warning ("notification channel closed by the server" )
395395 goto Exit
396396 }
397397 if err != nil {
398- log .Error ("getting notifications: %s %s" , err , noti )
398+ log .Error ("getting notifications: %s %s" , err , ntf )
399399 goto Exit
400400 }
401- c .handleNotification (c .streamNotifications , noti )
401+ if ntf .Type <= protocol .Action_NONE {
402+ log .Debug ("Server ordered to close notifications" )
403+ goto Exit
404+ }
405+ c .handleNotification (c .streamNotifications , ntf )
402406 }
403407 }
404408Exit:
You can’t perform that action at this time.
0 commit comments