clear timeouts before calling stop

This commit is contained in:
mike k
2021-01-25 10:26:54 -05:00
parent 2d880ac95b
commit 745c8e1b1c

View File

@@ -89,9 +89,9 @@ async function createSafeRedisLeader({
} }
async function shutdown(){ async function shutdown(){
await stop()
renewTimeoutId && clearTimeout(renewTimeoutId) renewTimeoutId && clearTimeout(renewTimeoutId)
electTimeoutId && clearTimeout(electTimeoutId) electTimeoutId && clearTimeout(electTimeoutId)
await stop()
} }
return { return {