Skip to content

Commit

Permalink
skip StatusBadNoSubscription in monitor loop
Browse files Browse the repository at this point in the history
  • Loading branch information
hotafrika committed Aug 15, 2022
1 parent 5102686 commit f041aad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ func (c *Client) monitor(ctx context.Context) {
return
}

// the subscriptions don't exist for session.
// skip this error and continue monitor loop
if errors.Is(err, ua.StatusBadNoSubscription) {
continue
}

// tell the handler the connection is disconnected
c.setState(Disconnected)
dlog.Print("disconnected")
Expand Down

0 comments on commit f041aad

Please sign in to comment.