*Change heartbeat check to 1/4 the heartBeatInterval rate

This commit is contained in:
Derrick Hammer 2022-12-17 09:46:38 -05:00
parent ef4a6f60e9
commit dc1c9a1f82
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 1 deletions

View File

@ -75,7 +75,10 @@ export default class DHTCache extends EventEmitter {
});
this._ensurePeer(this.id);
setInterval(() => this._heartbeatCheck(), 5 * 1000);
setInterval(
() => this._heartbeatCheck(),
(this.heartBeatInterval / 4) * 1000
);
setInterval(() => this._emitHeartbeat(), this.heartBeatInterval * 1000);
}