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
|
||||
React.useEffect(() => {
|
||||
if (lock) {
|
||||
console.warn('hit syncSession lock');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -156,6 +157,7 @@ export const SessionContextProvider = (props: { children: React.ReactNode }) =>
|
|||
|
||||
saveSessionData({ sessionID: sessionID || '', session: newSession });
|
||||
setSession(newSession);
|
||||
setSessionState(SessionState.FullAuth);
|
||||
setLock(false);
|
||||
} catch (e) {
|
||||
console.error('syncSession failed', e);
|
||||
|
|
Loading…
Add table
Reference in a new issue