Compare commits
No commits in common. "4d6f9a81d5f30a3ad9445c917cc9b9a443f261f1" and "09b0e25f6e0f2037df261ff79ecc731b6ebb1dc8" have entirely different histories.
4d6f9a81d5
...
09b0e25f6e
|
@ -376,7 +376,7 @@ class DHTCache extends events_1.default {
|
||||||
const node = this.graph.node.get(peer);
|
const node = this.graph.node.get(peer);
|
||||||
const heartbeat = node?.heartbeat;
|
const heartbeat = node?.heartbeat;
|
||||||
const conn = this.swarm._allConnections.get(pubkey);
|
const conn = this.swarm._allConnections.get(pubkey);
|
||||||
const online = conn && heartbeat > 0 && Date.now() - heartbeat <= 60 * 1000;
|
const online = conn && heartbeat > 0 && Date.now() - heartbeat > 60 * 1000;
|
||||||
if (node?.online !== online) {
|
if (node?.online !== online) {
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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