Xo::call() should never through synchronously.

This commit is contained in:
Julien Fontanet 2015-03-04 15:01:30 +01:00
parent 25472bcfa6
commit dda51f2801

View File

@ -358,7 +358,9 @@ Xo.prototype.call = function (method, params) {
// Prevent session.*() from being because it may interfere
// with this class session management.
if (startsWith(method, 'session.')) {
throw new Error('session.*() methods are disabled from this interface');
return Bluebird.reject(
new Error('session.*() methods are disabled from this interface')
);
}
return this._session.bind(this).then(function () {