mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
10 lines
366 B
TypeScript
10 lines
366 B
TypeScript
import { Shard } from "./types.ts";
|
|
|
|
export function stopHeartbeating(shard: Shard): void {
|
|
// Clear the regular heartbeat interval.
|
|
clearInterval(shard.heart.intervalId);
|
|
// It's possible that the Shard got closed before the first jittered heartbeat.
|
|
// To go safe we should clear the related timeout too.
|
|
clearTimeout(shard.heart.timeoutId);
|
|
}
|