Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: remove steal fallback from debuggableNavigatorLock (#43172)

Katerina Skroumpelou996104a90b6f
diff --git a/packages/common/gotrue.ts b/packages/common/gotrue.ts
index cd285c74d2e..1c6042ae020 100644
--- a/packages/common/gotrue.ts
+++ b/packages/common/gotrue.ts
@@ -147,32 +147,10 @@ async function debuggableNavigatorLock<R>(
}
console.error(
- `Waited for over 10s to acquire an Auth client lock, will steal the lock to unblock`,
+ `Waited for over 10s to acquire an Auth client lock`,
await navigator.locks.query(),
stackException
)
-
- // quickly steal the lock and release it so that others can acquire it,
- // while leaving the code that was holding it to continue running
- navigator.locks
- .request(
- name,
- {
- steal: true,
- },
- async () => {
- await new Promise((accept) => {
- setTimeout(accept, 0)
- })
-
- console.error('Lock was stolen and now released', stackException)
- }
- )
- .catch((e: any) => {
- if (captureException) {
- captureException(e)
- }
- })
})()
}, 10000)