re-establish subscriptions after ws disconnect
This commit is contained in:
@@ -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}`
|
||||
|
||||
Reference in New Issue
Block a user