Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Commit

Permalink
cleanup on exit now only waits up to 1 second before completing.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoffner committed Mar 21, 2017
1 parent 8a84312 commit 498b566
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/shovel.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,10 @@ function exec(opts, name, args, processOptions, processStdin, cb) {
child.on('exit', function (code, signal) {
// wait the remaining time left to see if all stdio processes close
// preferably we cleanup after 'exit' is called
// only wait up to 1 second though
setTimeout(function() {
complete(code, signal);
}, getTimeLeft(timeout));
}, Math.min(getTimeLeft(timeout), 1000));
});

child.on('close', function (code, signal) {
Expand Down

0 comments on commit 498b566

Please sign in to comment.