diff --git a/lib/node.js b/lib/node.js index 934c5a0..2dad557 100644 --- a/lib/node.js +++ b/lib/node.js @@ -60,6 +60,7 @@ function Node() this._tries = 0; this._down = 0; + this._lastSent = 0; this.blocks = []; @@ -286,6 +287,15 @@ Node.prototype.changed = function() { var changed = ! _.isEqual(this._lastStats, JSON.stringify(this.stats)); console.log(changed); + + if(this._tries - this._lastSent > 5) + { + console.log('force send'); + this._lastSent = this._tries; + + return true; + } + return changed; }