You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
To avoid hitting our push servers too often, we check our last successful verification first and verify again after the PERIODIC_INTERVAL_MILLISECONDS interval.
A problem arises when we first access the prefLastVerified: if the value does not exist, we use System.currentTimeMillis() which should be fine in most cases, except on it's first usage:
Here, we compare the current time with the pref value (which doesn't exist), so we query the current time again. The difference of that is therefore a negative value which is always fail the verify check on that first attempt.
…ture
When we first access the `lastVerified` pref we do not have an value
stored so we get the value from the current time.
The first usage is where we compare the delta of the current time with
the `lastVerified` so this lead us to have a negative value which fails.
…ture
When we first access the `lastVerified` pref we do not have an value
stored so we get the value from the current time.
The first usage is where we compare the delta of the current time with
the `lastVerified` so this lead us to have a negative value which fails.
borsbot
pushed a commit
that referenced
this issue
Jun 8, 2020
7239: Close#7236: Fix last verification check in AutoPushFeature r=Amejia481 a=jonalmeida
When we first access the `lastVerified` pref we do not have an value
stored so we get the value from the current time.
The first usage is where we compare the delta of the current time with
the `lastVerified` so this lead us to have a negative value which fails.
Co-authored-by: Jonathan Almeida <[email protected]>
To avoid hitting our push servers too often, we check our last successful verification first and verify again after the
PERIODIC_INTERVAL_MILLISECONDS
interval.A problem arises when we first access the
prefLastVerified
: if the value does not exist, we useSystem.currentTimeMillis()
which should be fine in most cases, except on it's first usage:Here, we compare the current time with the pref value (which doesn't exist), so we query the current time again. The difference of that is therefore a negative value which is always fail the verify check on that first attempt.
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: