fix(timer): update time offset edge case
Prevents the client from updating its time offset when the time returned from the server is zero, which is the default returned value when there is no userId. This would make the client to calculate a gigantic negative time offset leading the timer to reach the end prematurely/instantaneously.
This commit is contained in:
parent
0659f15211
commit
215fe73542
@ -121,6 +121,7 @@ const fetchTimeOffset = () => {
|
||||
const t0 = Date.now();
|
||||
|
||||
makeCall('getServerTime').then(result => {
|
||||
if (result == 0) return;
|
||||
const t3 = Date.now();
|
||||
|
||||
const ts = result;
|
||||
|
Loading…
Reference in New Issue
Block a user