Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,10 @@ export class BrowserManager {
);
});

// Ensure close() only drops the WebSocket connection instead of sending
// the CDP Browser.close command which kills the external browser process.
(browser as any)._shouldCloseConnectionOnClose = true;

// Validate and set up state, cleaning up browser connection if anything fails
try {
const contexts = browser.contexts();
Expand Down