mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-30 13:35:04 +02:00
UBERF-8899: Fix Reconnect performance (#7597)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user