revert other changes
This commit is contained in:
parent
91b697cfd2
commit
3eebbd1cd1
|
@ -60,7 +60,7 @@ export class PlaywrightConnection {
|
|||
private _root: DispatcherScope;
|
||||
private _profileName: string;
|
||||
|
||||
constructor(lock: Promise<void>, clientType: ClientType, ws: WebSocket, options: Options, playwright: Playwright, preLaunched: PreLaunched, id: string, onClose: () => Promise<void>) {
|
||||
constructor(lock: Promise<void>, clientType: ClientType, ws: WebSocket, options: Options, playwright: Playwright, preLaunched: PreLaunched, id: string, onClose: () => void) {
|
||||
this._ws = ws;
|
||||
this._playwright = playwright;
|
||||
this._preLaunched = preLaunched;
|
||||
|
|
|
@ -125,15 +125,7 @@ export class PlaywrightServer {
|
|||
androidDevice: this._options.preLaunchedAndroidDevice,
|
||||
socksProxy: this._options.preLaunchedSocksProxy,
|
||||
},
|
||||
id,
|
||||
async () => {
|
||||
semaphore.release();
|
||||
|
||||
// in non-extension mode, we expect a single connection at a time. when it closes, we clean up everything.
|
||||
if (this._options.mode !== 'extension')
|
||||
await Promise.all(this._playwright.allBrowsers().map(browser => browser.close({ reason: 'Connection closed' })));
|
||||
}
|
||||
);
|
||||
id, () => semaphore.release());
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue