UBERF-7118: Fix upgrade/refresh on reconnect (#5704)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-05-30 22:31:12 +05:00
committed by GitHub
parent 3e913c9db7
commit 42d8c4582c
2 changed files with 21 additions and 5 deletions
+4 -4
View File
@@ -276,10 +276,10 @@ export function startHttpServer (
if (webSocketData.session instanceof Promise) {
void webSocketData.session.then((s) => {
if ('upgrade' in s || 'error' in s) {
if ('error' in s) {
ctx.error('error', { error: s.error?.message, stack: s.error?.stack })
}
if ('error' in s) {
ctx.error('error', { error: s.error?.message, stack: s.error?.stack })
}
if ('upgrade' in s) {
void cs
.send(ctx, { id: -1, result: { state: 'upgrading', stats: (s as any).upgradeInfo } }, false, false)
.then(() => {