diff --git a/lib/protocol/timedata.js b/lib/protocol/timedata.js index ddefcc14..310c090a 100644 --- a/lib/protocol/timedata.js +++ b/lib/protocol/timedata.js @@ -69,17 +69,20 @@ TimeData.prototype.add = function add(id, time) { if (Math.abs(median) >= 70 * 60) { if (!this.checked) { let match = false; + for (const offset of this.samples) { if (offset !== 0 && Math.abs(offset) < 5 * 60) { match = true; break; } } + if (!match) { this.checked = true; this.emit('mismatch'); } } + median = 0; }