fix(xo-web): don't sign out on connection error (#7103)

May fix zammad#17717

Introduced by 005ab47d9
This commit is contained in:
Julien Fontanet
2023-10-18 18:07:16 +02:00
committed by GitHub
parent 9b236a6191
commit 2924f82754
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -20,6 +20,7 @@
- [Usage report] Fix "Converting circular structure to JSON" error
- [Home] Fix OS icons alignment (PR [#7090](https://github.com/vatesfr/xen-orchestra/pull/7090))
- [SR/Advanced] Fix the total number of VDIs to coalesce by taking into account common chains [#7016](https://github.com/vatesfr/xen-orchestra/issues/7016) (PR [#7098](https://github.com/vatesfr/xen-orchestra/pull/7098))
- Don't require to sign in again in XO after losing connection to XO Server (e.g. when restarting or upgrading XO) (PR [#7103](https://github.com/vatesfr/xen-orchestra/pull/7103))
### Packages to release
+7 -1
View File
@@ -109,7 +109,13 @@ const xo = invoke(() => {
credentials: { token },
})
xo.on('authenticationFailure', signOut)
xo.on('authenticationFailure', error => {
console.warn('authenticationFailure', error)
if (error.name !== 'ConnectionError') {
signOut(error)
}
})
xo.on('scheduledAttempt', ({ delay }) => {
console.warn('next attempt in %s ms', delay)
})