Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix hung launcher on shutdown of Safari (#38)
In some cases (notably macOS Safari under GitHub Actions), a call to forceKill() would be triggered during another call to forceKill(). This could cause the second Promise to go unresolved, leading to a hang. On GitHub, eventually, the workflow would be cancelled. This fixes the nested calls to forceKill by making them both resolve on the same event (the shutdown triggered by the first call). This also adds a timeout for shutting down a WebDriver session. Although this does not appear to be the root cause of the hang we were experiencing in GitHub Actions workflows, it should be safer to have this timeout. If we can't stop a WebDriver session gracefully, we will timeout after 5s and end the launcher anyway. Closes #24
- Loading branch information