diff --git a/lib/utils/asyncobject.js b/lib/utils/asyncobject.js index e8c1b0d7..766f0632 100644 --- a/lib/utils/asyncobject.js +++ b/lib/utils/asyncobject.js @@ -176,10 +176,10 @@ AsyncObject.prototype.hook = function hook(type, handler) { * @returns {Promise} */ -AsyncObject.prototype.fire = function fire() { +AsyncObject.prototype.fire = co(function* fire() { + yield this.fireHook.apply(this, arguments); this.emit.apply(this, arguments); - return this.fireHook.apply(this, arguments); -}; +}); /** * Emit an asynchronous event (hook).