diff --git a/src/index.ts b/src/index.ts index 38b9af2..b16b4c9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -324,7 +324,10 @@ export default class DHTCache extends EventEmitter { return; } - this._addEntityConnection(id, bufId as Buffer); + this.addPeerHandler({ + remotePublicKey: id, + }); + this._setEntity(bufId as Buffer, { heartbeat: Date.now() }); this.log.debug(`Heartbeat received from ${bufId.toString("hex")}`);