Skip to content

Commit

Permalink
Return disconnect promise to prevent race (#2359)
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone authored and brendankenny committed May 25, 2017
1 parent 7fece8f commit e332691
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lighthouse-core/gather/gather-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,8 @@ class GatherRunner {
}

static disposeDriver(driver) {
// We dont need to hold up the reporting for the reload/disconnect,
// so we will not return a promise in here.
log.log('status', 'Disconnecting from browser...');
driver.disconnect().catch(err => {
return driver.disconnect().catch(err => {
// Ignore disconnecting error if browser was already closed.
// See https://github.com/GoogleChrome/lighthouse/issues/1583
if (!(/close\/.*status: 500$/.test(err.message))) {
Expand Down

0 comments on commit e332691

Please sign in to comment.