UBERF-8899: Fix Reconnect performance (#7597)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2025-01-07 23:21:27 +07:00
committed by GitHub
parent 1d836b73ab
commit a2cbc2a5fb
12 changed files with 106 additions and 73 deletions
+2 -2
View File
@@ -118,10 +118,10 @@ export default async () => {
reject(new Error(`Connection timeout, and no connection established to ${endpoint}`))
}
}, connectTimeout)
newOpt.onConnect = async (event, data) => {
newOpt.onConnect = async (event, lastTx, data) => {
// Any event is fine, it means server is alive.
clearTimeout(connectTO)
await opt?.onConnect?.(event, data)
await opt?.onConnect?.(event, lastTx, data)
resolve()
}
})