Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stall_check_bug' into release-1.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
petong committed Dec 21, 2018
2 parents c5a69ea + a23302b commit 09e4160
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/augurNodeServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ AugurNodeServer.prototype.requestLatestSyncedBlock = function () {

AugurNodeServer.prototype.doStallCheck = function () {
log.info(`AugurNodeServer doStallCheck`)
if (!this.previousLastSyncBlockNumber) return;
if (!this.previousLastSyncBlockNumber) {
this.previousLastSyncBlockNumber = this.lastSyncBlockNumber
return
}
if (!this.isShuttingDown && (this.lastSyncBlockNumber === this.previousLastSyncBlockNumber)) {
log.info(`Sync has stalled at block ${this.lastSyncBlockNumber}. Restarting`)
this.restart()
Expand Down

0 comments on commit 09e4160

Please sign in to comment.