mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-14 04:08:46 +00:00
fix: tab reconnects in a loop after signing in without a page reload (#32341)
After signing in on a page without reloading it, the browser tab kept using its signed-out state whenever its live connection had to reconnect. Since 0.12.0 the server drops such a connection as soon as an open chat subscribes to live updates, and the tab reconnected immediately, so after a connection drop (sleep, network change, server restart) it reconnected several times per second until the page was reloaded, putting heavy load on the server. Reconnects now use the current sign-in, so the tab comes back signed in on the first attempt and stays connected. Fixes #32338
This commit is contained in:
parent
83dcc2dbea
commit
c92bc089be
1 changed files with 1 additions and 1 deletions
|
|
@ -183,7 +183,7 @@
|
|||
randomizationFactor: 0.5,
|
||||
path: '/ws/socket.io',
|
||||
transports: enableWebsocket ? ['websocket'] : ['polling', 'websocket'],
|
||||
auth: { token: localStorage.token }
|
||||
auth: (cb) => cb({ token: localStorage.token })
|
||||
});
|
||||
await socket.set(_socket);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue