Skip to content

fix(browser): disconnect in shutdown when Browser.close raises - #754

Merged
route merged 1 commit into
mainfrom
fix/shutdown-disconnect
Nov 30, 2026
Merged

route merged 1 commit into
mainfrom
fix/shutdown-disconnect

Conversation

@route

@route route commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

shutdown ran disconnect in the same begin as Browser.close, so any error other than DeadBrowserError skipped it: a TimeoutError from a hung browser, or a CDP error from a remote endpoint that refuses the command. The client's threads and socket stayed open and browser.client still pointed at them.

Now shutdown disconnects in the ensure and then stops the process, the same order quit uses. The disconnect docs no longer mention page connections, which #750 removed.

Reported in #750 (comment) by @ZilvinasKucinskas.

shutdown ran disconnect in the same begin as Browser.close, so a TimeoutError from a hung browser or a CDP error
from a remote endpoint skipped it and left the client's threads and socket open. Disconnect in the ensure, before
stopping the process, as quit does. Also drop the stale mention of page connections from the disconnect docs.
@route
route merged commit b170901 into main Nov 30, 2026
7 checks passed
@route
route deleted the fix/shutdown-disconnect branch November 30, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant