mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 11:59:11 +00:00
add warning for when syncSession is locked but called again
This commit is contained in:
parent
da9f0b6202
commit
3dda14e413
1 changed files with 2 additions and 0 deletions
|
@ -121,6 +121,7 @@ export const SessionContextProvider = (props: { children: React.ReactNode }) =>
|
||||||
// Sync session data on HalfAuth
|
// Sync session data on HalfAuth
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (lock) {
|
if (lock) {
|
||||||
|
console.warn('hit syncSession lock');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,6 +157,7 @@ export const SessionContextProvider = (props: { children: React.ReactNode }) =>
|
||||||
|
|
||||||
saveSessionData({ sessionID: sessionID || '', session: newSession });
|
saveSessionData({ sessionID: sessionID || '', session: newSession });
|
||||||
setSession(newSession);
|
setSession(newSession);
|
||||||
|
setSessionState(SessionState.FullAuth);
|
||||||
setLock(false);
|
setLock(false);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('syncSession failed', e);
|
console.error('syncSession failed', e);
|
||||||
|
|
Loading…
Add table
Reference in a new issue