fix(demo): detect webview remote debugging

fixes #562
This commit is contained in:
Simon Chan 2023-06-09 16:06:46 +08:00
parent dc1a23b83d
commit d9685acc6f
No known key found for this signature in database
GPG key ID: 8F75717685A974FB

View file

@ -71,13 +71,6 @@ class AdbUndiciSocket extends Duplex {
} }
} }
async _final(
callback: (error?: Error | null | undefined) => void
): Promise<void> {
await this._socket.close();
callback();
}
async _destroy( async _destroy(
error: Error | null, error: Error | null,
callback: (error: Error | null) => void callback: (error: Error | null) => void
@ -201,10 +194,8 @@ const STATE = makeAutoObservable(
); );
const SOCKET_NAMES = [ const SOCKET_NAMES = [
"@chrome_devtools_remote", "@(.*)_devtools_remote(_\\d+)?",
"@chrome_devtools_remote_[0-9]+", "@com\\.opera\\.browser(\\.beta)?\\.devtools",
"@com.opera.browser.devtools",
"@com.opera.browser.beta.devtools",
]; ];
const GET_SOCKET_COMMAND = [ const GET_SOCKET_COMMAND = [