mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
parent
cbe84d7139
commit
71288ea3f2
@ -541,6 +541,12 @@
|
||||
|
||||
$socket?.on('chat-events', chatEventHandler);
|
||||
$socket?.on('channel-events', channelEventHandler);
|
||||
|
||||
// Set up the token expiry check
|
||||
if (tokenTimer) {
|
||||
clearInterval(tokenTimer);
|
||||
}
|
||||
tokenTimer = setInterval(checkTokenExpiry, 15000);
|
||||
} else {
|
||||
$socket?.off('chat-events', chatEventHandler);
|
||||
$socket?.off('channel-events', channelEventHandler);
|
||||
@ -593,12 +599,6 @@
|
||||
|
||||
await user.set(sessionUser);
|
||||
await config.set(await getBackendConfig());
|
||||
|
||||
// Set up the token expiry check
|
||||
if (tokenTimer) {
|
||||
clearInterval(tokenTimer);
|
||||
}
|
||||
tokenTimer = setInterval(checkTokenExpiry, 1000);
|
||||
} else {
|
||||
// Redirect Invalid Session User to /auth Page
|
||||
localStorage.removeItem('token');
|
||||
|
Loading…
Reference in New Issue
Block a user