Skip to content

Commit

Permalink
Fix unref error (#400)
Browse files Browse the repository at this point in the history
* Update kill.js

* Update kill.js

* Update lib/kill.js

Co-Authored-By: ehmicky <ehmicky@users.noreply.github.com>
  • Loading branch information
mifi and ehmicky committed Dec 18, 2019
1 parent 4093556 commit 09cd28a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/kill.js
Expand Up @@ -18,9 +18,14 @@ const setKillTimeout = (kill, signal, options, killResult) => {
}

const timeout = getForceKillAfterTimeout(options);
setTimeout(() => {
const t = setTimeout(() => {
kill('SIGKILL');
}, timeout).unref();
}, timeout);

// istanbul ignore else
if (t.unref) {
t.unref();
}
};

const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => {
Expand Down

0 comments on commit 09cd28a

Please sign in to comment.