Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

always call the callback and return #27

Closed
wants to merge 1 commit into from
Closed

Conversation

pibi
Copy link
Contributor

@pibi pibi commented May 10, 2016

Fix for #12

@Amri91
Copy link

Amri91 commented Jun 2, 2016

@pibi, I tested the new code and I am still getting the issue mccormicka/Mockgoose#204.

Do we not need to use something like this?

if(typeof(callback) == "function"){
            callback(child.status);
}

at the end?

debug('starting mongokiller.js, ppid:%d\tmongod pid:%d', process.pid, child_pid);
var killer = proc.spawn("node", [path.join(__dirname, "binjs", "mongokiller.js"), process.pid, child_pid], {
stdio: 'ignore',
detached: true
});
killer.unref();
}

callback(child.status);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need an IF statement to check if the callback is indeed a function.

@brandon-arnold
Copy link

I also required the conditional described by @Amri91. I'm on Windows 10.

My build of MERN is broken without this. When will it get merged?

@winfinit
Copy link
Contributor

winfinit commented Mar 8, 2017

there was a rewrite of this library, so I am closing this pull request.

@winfinit winfinit closed this Mar 8, 2017
t1bb4r pushed a commit to t1bb4r/mongodb-prebuilt that referenced this pull request Jul 18, 2018
Fix UnhandledPromiseRejectionWarning error
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants