don't quit ping loop when error on ping
This commit is contained in:
parent
fa9ec2cfbc
commit
d78269f5b9
6
arlo.go
6
arlo.go
@ -134,9 +134,7 @@ func (a *Arlo) Login(ctx context.Context, user string, pass string) error {
|
||||
return
|
||||
case _ = <-ticker.C:
|
||||
if err := a.Ping(ctx); err != nil {
|
||||
log.Errorf("Pingloop > error while pinging: %v > disconnect event stream", err)
|
||||
_ = a.Disconnect()
|
||||
return
|
||||
log.Errorf("Pingloop > error while pinging: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -294,8 +292,6 @@ func (a *Arlo) Disconnect() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Ping makes a call to the subscriptions endpoint. The Arlo event stream requires this message to be sent every 30s.
|
||||
|
||||
func (a *Arlo) NotifyEventStream(payload EventStreamPayload, xcloudId string) error {
|
||||
var response ErrorResponse
|
||||
err := a.post(fmt.Sprintf(NotifyUri, payload.To), payload, &response, xcloudId)
|
||||
|
Loading…
Reference in New Issue
Block a user