Notify ditto activity when restarting long polling
This commit is contained in:
parent
fc0882f285
commit
43ec0da6e9
1 changed files with 8 additions and 0 deletions
|
@ -71,6 +71,14 @@ func (r *RPC) ListenReceiveMessages(payload []byte) {
|
|||
}
|
||||
r.client.Logger.Debug().Int("statusCode", resp.StatusCode).Msg("Long polling opened")
|
||||
r.conn = resp.Body
|
||||
if r.client.authData.DevicePair != nil {
|
||||
go func() {
|
||||
err := r.client.Session.NotifyDittoActivity()
|
||||
if err != nil {
|
||||
r.client.Logger.Err(err).Msg("Error notifying ditto activity")
|
||||
}
|
||||
}()
|
||||
}
|
||||
r.startReadingData(resp.Body)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue