Skip to content

Commit

Permalink
Merge pull request #508 from NuSkooler/bugfix/doors_socket
Browse files Browse the repository at this point in the history
Fixed door logic per issue #506
  • Loading branch information
NuSkooler authored Sep 26, 2023
2 parents dddbad4 + 1d31b26 commit b0542cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/door.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!`));
}
Expand Down

0 comments on commit b0542cf

Please sign in to comment.