Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It is possible that we were resolving the gather chain before we had disconnected. When manually launching and killing chrome this can race and result in an error to the user. This fixes that problem. \o/. Fixes #2337 --- Test plan: Run launcher with: ```ts const lighthouse = require('lighthouse'); import {launch} from './chrome-launcher'; async function runLighthouse(url: string) { const opts = { chromeFlags: ['--headless'], }; const chrome = await launch(opts); const flags = { output: 'json', port: chrome.port, }; const results = await lighthouse(url, flags); process.on('uncaughtException', (e: any) => { console.log(e); }); await chrome.kill(); return results; } runLighthouse('https://example.com'); ``` Without this patch, and then run it with the patch. Observe it now working.
- Loading branch information