Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: don't detach CdpSession #12154

Merged
merged 2 commits into from Apr 23, 2024
Merged

Conversation

Lightning00Blade
Copy link
Collaborator

@Lightning00Blade Lightning00Blade commented Mar 26, 2024

Allow the Mapper to handle it's own clean-up, else w get errors in the logs + we send too many commands.
Users should clean the CdpSession on their own if created via createCDPSession

@OrKoN
Copy link
Collaborator

OrKoN commented Mar 26, 2024

Does it solve any bug/issue?

@Lightning00Blade
Copy link
Collaborator Author

There were Errors in the Logs, they are always cleaned up before the make the call so we get errors instead.

@Lightning00Blade Lightning00Blade changed the title chore: detach only user created CdpSessions chore: don't detach CdpSession Mar 27, 2024
@Lightning00Blade Lightning00Blade marked this pull request as draft March 27, 2024 10:42
@OrKoN OrKoN force-pushed the main branch 4 times, most recently from 2ff1e4f to e0932e5 Compare April 16, 2024 09:37
@Lightning00Blade Lightning00Blade marked this pull request as ready for review April 19, 2024 09:02
@@ -106,7 +106,7 @@ export class BidiFrame extends Frame {
this.browsingContext.on('closed', () => {
for (const session of BidiCdpSession.sessions.values()) {
if (session.frame === this) {
void session.detach().catch(debugError);
session.onClose();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the BrowserContext is closed Mapper the session is already closed so we need to only remove it from the map.

@Lightning00Blade Lightning00Blade enabled auto-merge (squash) April 23, 2024 08:49
@Lightning00Blade Lightning00Blade merged commit f239130 into main Apr 23, 2024
38 checks passed
@Lightning00Blade Lightning00Blade deleted the deatch-on-user-session-only branch April 23, 2024 08:49
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.

None yet

2 participants