Skip to content

Commit 9ca6791

Browse files
committed
Add a timeout on whoami test after 'adb root'
Not for a specific report, but it's clearly missing where it's used above, and there are all sorts of ADB issues that could create intermittent delays or issues to cause this.
1 parent 93b9154 commit 9ca6791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interceptors/android/adb-commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export async function getRootCommand(adbClient: Adb.DeviceClient): Promise<RootC
183183

184184
await delay(500); // Wait, since they may not disconnect immediately
185185
const whoami = await waitUntil(250, 10, (): Promise<string | false> => {
186-
return run(adbClient, ['whoami']).catch(() => false)
186+
return run(adbClient, ['whoami'], { timeout: 1000 }).catch(() => false)
187187
}).catch(console.log);
188188

189189
return (whoami || '').trim() === 'root'

0 commit comments

Comments
 (0)