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
fix: avoid browser hanging on close window while video is recording (closes #6037) #6800
Conversation
@@ -184,6 +186,15 @@ export default class BrowserConnectionGateway { | |||
} | |||
} | |||
|
|||
private static _onCloseWindowRequest (req: IncomingMessage, res: ServerResponse, connection: BrowserConnection): void { | |||
if (BrowserConnectionGateway._ensureConnectionReady(res, connection)) { | |||
connection.provider.closeBrowserChildWindow(connection.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we catch errors of the connection.provider.closeBrowserChildWindow
method here?
await this.setClientInactive(); | ||
|
||
// NOTE: delay browser window closing | ||
await delay(100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use here a more stable way to check that window is closed?
src/browser/provider/plugin-host.js
Outdated
@@ -153,4 +153,8 @@ export default class BrowserProviderPluginHost { | |||
getConfig (value) { | |||
return value; | |||
} | |||
|
|||
closeBrowserChildWindow (/*browserId*/) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async closeBrowserChildWindow (/*browserId*/) {}
/rebase |
/rebase |
Closes #6037