diff --git a/core/door.js b/core/door.js index 313adf74..68f0ad9a 100644 --- a/core/door.js +++ b/core/door.js @@ -57,8 +57,10 @@ module.exports = class Door { run(exeInfo, cb) { this.encoding = (exeInfo.encoding || 'cp437').toLowerCase(); - if ('socket' === this.io && !this.sockServer) { - return cb(Errors.UnexpectedState('Socket server is not running')); + if ('socket' === this.io) { + if(!this.sockServer) { + return cb(Errors.UnexpectedState('Socket server is not running')); + } } else if ('stdio' !== this.io) { return cb(Errors.Invalid(`"${this.io}" is not a valid io type!`)); }