Skip to content

Commit

Permalink
kill had no polling delay, that was not smart
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Oct 28, 2016
1 parent 7a154ac commit 2d4bbbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crater-util",
"version": "1.1.0",
"version": "1.1.1",
"description": "my personal skeleton for ES2015 library NPM packages",
"main": "lib/index.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/kill.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export default async function kill(child: ChildProcess, signal?: string = 'SIGTE
children.forEach(child => process.kill(parseInt(child.PID), signal))
break
} catch (error) {
// keep looping
// sleep, then keep looping
await new Promise(resolve => setTimeout(resolve, 500))
}
}
}
Expand Down

0 comments on commit 2d4bbbe

Please sign in to comment.