re-establish subscriptions after ws disconnect

This commit is contained in:
tim
2025-02-26 17:28:23 -04:00
parent 2e49346533
commit f5f53c6af4
3 changed files with 16 additions and 2 deletions

View File

@@ -17,6 +17,16 @@ export function subOHLC( chainId, pool, period ) {
}
export function refreshOHLCSubs() {
const keys = []
for (const key of Object.keys(ohlcSubCounts)) {
const [chainId, pool, period] = key.split('|')
keys.push(`${pool}|${period}`)
}
socket.emit('subOHLCs', chainId, keys)
}
export function unsubOHLC( chainId, pool, period ) {
const key = `${pool}|${period}`
const ckey = `${chainId}|${key}`