correction commit précédent

This commit is contained in:
Laurent Le Houerou 2020-06-23 10:03:14 +04:00
parent 7579a341d5
commit 9bc06cb150

View File

@ -234,10 +234,16 @@ func (a *Arlo) IsConnected() bool {
}
func (a *Arlo) Subscribe(ctx context.Context) error {
lastid := ""
if a.eventStream != nil {
lastid = a.eventStream.GetLastId()
}
a.eventStream = newEventStream(
BaseUrl+fmt.Sprintf(NotifyResponsesPushServiceUri),
&http.Client{Jar: a.client.GetClient().Jar},
a.client.Header.Get("Authorization"),
lastid,
)
err := a.eventStream.listen(ctx)