message: fix doc store dispose timeout
diff: @@ -115,13 +115,15 @@ export class DocumentStore extends DocumentStoreBase {
  return new BluebirdPromise((resolve, reject) => {
  let listenersExecCallbacksCount = 0;
  const listenersCount = this.listenerCount("afterDispose");
  -
  + if (listenersCount === 0) {
  + resolve();
  + } else {
  this.emit("afterDispose", () => {
  if (listenersCount === ++listenersExecCallbacksCount) {
  resolve();
  }
  });
  -
  + }
  })
  .timeout(5000)
  .catch((err) => this._log.warn(`Error handling 'afterDispose'`, err));
  