fix: clear debounce timeout on close

This commit is contained in:
Adhiraj Singh
2021-12-18 23:33:55 +05:30
parent 1af46bfb3d
commit 89a159aac3

View File

@@ -271,6 +271,10 @@ const makeChatsSocket = (config: LegacySocketConfig) => {
ev.emit('blocklist.set', { blocklist }) ev.emit('blocklist.set', { blocklist })
}) })
socketEvents.on('ws-close', () => {
chatsDebounceTimeout.cancel()
})
return { return {
...sock, ...sock,
sendChatsQuery, sendChatsQuery,