Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure force kill timeout isn't keeping process alive #7

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

bengourley
Copy link
Contributor

πŸ‘‹ I don't know if you still use this module? I was checking it out in relation to something similar I'm working on and noticed what I think is a bug.

I thought I'd throw this PR up quickly – I didn't add any tests but I did run the existing ones and they apssed. I'm pretty sure the behaviour of this module would be to wait up to forceTimeout ms every time the process is killed in non-dev envs because the timeout would keep the event loop non-empty.

See unref() for more info.

@serby
Copy link
Owner

serby commented Aug 10, 2018

Thanks for the PR

@bengourley Hope you are well.

I'm sure this worked as expected when it was written. I've not used .unref() but since v9.7.0 it looks like that is the correct way to ensure the event loop kept running.

I'll merge and release and investigate at a later date.

@serby serby merged commit a214d90 into serby:master Aug 10, 2018
@bengourley
Copy link
Contributor Author

I'm good thanks!

unref() was added in 0.9 (not 9) so it's been around a while! I'm pretty sure I remember the processes not closing out quick enough in dev, which was why we skipped the whole thing with the NODE_ENV dev check. Cause my have been this – could be wrong though.

@serby
Copy link
Owner

serby commented Aug 12, 2018

I'm an idiot! I read the doc wrong.

I'll do some investigation and let you know how I get on.

@bengourley
Copy link
Contributor Author

bengourley commented Aug 12, 2018 via email

@serby
Copy link
Owner

serby commented Aug 12, 2018

No totally pointless as I wasn't aware of .unref() so I've learnt something, thanks!

You should drop by sometime, it would be good to catch up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants