Skip to content

Commit

Permalink
simplify a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Sep 20, 2023
1 parent d149f8f commit ffa2cfc
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/uiautomator2.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,12 @@ class UiAutomator2Server {
try {
await this.adb.forceStop(SERVER_TEST_PACKAGE_ID);
} catch (ignore) {}
if (!strictCleanup) {
await waitStop();
return;
if (strictCleanup) {
// https://github.com/appium/appium/issues/10749
try {
await this.adb.killProcessesByName('uiautomator');
} catch (ignore) {}
}
// https://github.com/appium/appium/issues/10749
try {
await this.adb.killProcessesByName('uiautomator');
} catch (ignore) {}
await waitStop();
}
}
Expand Down

0 comments on commit ffa2cfc

Please sign in to comment.