We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02452a4 commit 209520fCopy full SHA for 209520f
packages/mongodb-memory-server-core/src/util/utils.ts
@@ -99,6 +99,13 @@ export async function killProcess(
99
log(`Mongo[${mongodPort || 'unknown'}] killProcess: ${msg}`);
100
}
101
102
+ // this case can somehow happen, see https://github.com/nodkz/mongodb-memory-server/issues/666
103
+ if (isNullOrUndefined(childprocess)) {
104
+ ilog('childprocess was somehow undefined');
105
+
106
+ return;
107
+ }
108
109
// check if the childProcess (via PID) is still alive (found thanks to https://github.com/nodkz/mongodb-memory-server/issues/411)
110
if (!isAlive(childprocess.pid)) {
111
ilog("given childProcess's PID was not alive anymore");
0 commit comments