message: fix a race
  it was possible to hang a second realtime update if you initiated it in the gap between when the previous loop last ran its exit predicate and when its promise actually resolved
diff: @@ -55,14 +55,10 @@ class Indexers {
  this._queue.push({ hints, resolve, reject });
  }
  if (!this._running) {
  - this.log.debug("Starting new update loop");
  - this._running = true;
  this._updateLoop().then(() => {
  this.log.debug("Update loop finished");
  - this._running = false;
  }, err => {
  this.log.error("Unexpected error in _updateLoop %s", err);
  - this._running = false;
  });
  } else {
  this.log.debug("Joining update loop");
  @@ -71,6 +67,8 @@ class Indexers {
  }
  async _updateLoop() {
  + this._running = true;
  + try {
  while (this._queue.length > 0 || this._realTimeQueue.length > 0) {
  let queue = this._queue;
  this._queue = [];
  @@ -89,6 +87,9 @@ class Indexers {
  throw err;
  }
  }
  + } finally {
  + this._running = false;
  + }
  }
  async _runBatch(batch, realTime) {
  