Skip to content

Commit

Permalink
Exit the process on chrome crash
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwestendorf committed Jan 14, 2020
1 parent 60b46dd commit b0bb70c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ ChromeLauncher.launch({
port: 9222,
connectionPollInterval: 10
}).then((chrome) => {
console.log(`Chrome debugging port running on ${chrome.port}`);
console.log(`Chrome debugging port running on ${chrome.port}`)

chrome.process.on('close', (code) => {
console.error(`Chrome process closed with code ${code}`);
process.exit(code);
})

webServer.start()
console.log('Starting web server...')
Expand Down

0 comments on commit b0bb70c

Please sign in to comment.