Merge remote-tracking branch 'origin/qfix-onconnect' into staging

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-12-08 12:27:13 +07:00
commit 9ade3baa12
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2

View File

@ -121,11 +121,12 @@ export default async () => {
newOpt.onConnect = async (event, data) => {
// Any event is fine, it means server is alive.
clearTimeout(connectTO)
await opt?.onConnect?.(event, data)
resolve()
}
})
}
const clientConnection = connect(url, upgradeHandler, tokenPayload.workspace, tokenPayload.email, opt)
const clientConnection = connect(url, upgradeHandler, tokenPayload.workspace, tokenPayload.email, newOpt)
if (connectPromise !== undefined) {
await connectPromise
}