correction commit précédent
This commit is contained in:
parent
7579a341d5
commit
9bc06cb150
6
arlo.go
6
arlo.go
@ -234,10 +234,16 @@ func (a *Arlo) IsConnected() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *Arlo) Subscribe(ctx context.Context) error {
|
func (a *Arlo) Subscribe(ctx context.Context) error {
|
||||||
|
lastid := ""
|
||||||
|
if a.eventStream != nil {
|
||||||
|
lastid = a.eventStream.GetLastId()
|
||||||
|
}
|
||||||
|
|
||||||
a.eventStream = newEventStream(
|
a.eventStream = newEventStream(
|
||||||
BaseUrl+fmt.Sprintf(NotifyResponsesPushServiceUri),
|
BaseUrl+fmt.Sprintf(NotifyResponsesPushServiceUri),
|
||||||
&http.Client{Jar: a.client.GetClient().Jar},
|
&http.Client{Jar: a.client.GetClient().Jar},
|
||||||
a.client.Header.Get("Authorization"),
|
a.client.Header.Get("Authorization"),
|
||||||
|
lastid,
|
||||||
)
|
)
|
||||||
|
|
||||||
err := a.eventStream.listen(ctx)
|
err := a.eventStream.listen(ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user