We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39d4220 commit d99a71bCopy full SHA for d99a71b
lib/cluster-adapter.ts
@@ -719,13 +719,14 @@ export abstract class ClusterAdapterWithHeartbeat extends ClusterAdapter {
719
720
private scheduleHeartbeat() {
721
if (this.heartbeatTimer) {
722
- clearTimeout(this.heartbeatTimer);
+ this.heartbeatTimer.refresh();
723
+ } else {
724
+ this.heartbeatTimer = setTimeout(() => {
725
+ this.publish({
726
+ type: MessageType.HEARTBEAT,
727
+ });
728
+ }, this._opts.heartbeatInterval);
729
}
- this.heartbeatTimer = setTimeout(() => {
- this.publish({
- type: MessageType.HEARTBEAT,
- });
- }, this._opts.heartbeatInterval);
730
731
732
override close() {
0 commit comments