File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/mongodb-memory-server-core/src/util Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -537,7 +537,10 @@ export class MongoInstance extends EventEmitter implements ManagerBase {
537537 // check if the platform is windows, if yes check if the code is not "12" or "0" otherwise just check code is not "0"
538538 // because for mongodb any event on windows (like SIGINT / SIGTERM) will result in an code 12
539539 // https://docs.mongodb.com/manual/reference/exit-codes/#12
540- if ( ( process . platform === 'win32' && code != 12 && code != 0 ) || code != 0 ) {
540+ if (
541+ ( process . platform === 'win32' && code != 12 && code != 0 ) ||
542+ ( process . platform !== 'win32' && code != 0 )
543+ ) {
541544 this . debug ( 'closeHandler: Mongod instance closed with an non-0 (or non 12 on windows) code!' ) ;
542545 // Note: this also emits when a signal is present, which is expected because signals are not expected here
543546 this . emit ( MongoInstanceEvents . instanceError , new UnexpectedCloseError ( code , signal ) ) ;
You can’t perform that action at this time.
0 commit comments