*Bug fix heartbeat math
This commit is contained in:
parent
09b0e25f6e
commit
28eb7ac2d6
|
@ -478,7 +478,7 @@ export default class DHTCache extends EventEmitter {
|
||||||
|
|
||||||
const conn = this.swarm._allConnections.get(pubkey);
|
const conn = this.swarm._allConnections.get(pubkey);
|
||||||
const online =
|
const online =
|
||||||
conn && heartbeat > 0 && Date.now() - heartbeat > 60 * 1000;
|
conn && heartbeat > 0 && Date.now() - heartbeat <= 60 * 1000;
|
||||||
|
|
||||||
if (node?.online !== online) {
|
if (node?.online !== online) {
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
Loading…
Reference in New Issue