fix: prevent race condition
This commit is contained in:
parent
70cca596e4
commit
6a773367d4
1 changed files with 2 additions and 2 deletions
|
@ -204,10 +204,10 @@ export default async function trackLocation() {
|
|||
// Create throttled version of auth reload with lodash
|
||||
const reloadAuth = throttle(_reloadAuth, AUTH_RELOAD_THROTTLE, {
|
||||
leading: true,
|
||||
trailing: true,
|
||||
trailing: false, // Prevent trailing calls to avoid duplicate refreshes
|
||||
});
|
||||
|
||||
BackgroundGeolocation.onHttp((response) => {
|
||||
BackgroundGeolocation.onHttp(async (response) => {
|
||||
// Log the full response including headers if available
|
||||
locationLogger.debug("HTTP response received", {
|
||||
status: response?.status,
|
||||
|
|
Loading…
Add table
Reference in a new issue