Skip to content

Commit

Permalink
Optimize local emulator connection speed (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
LmeSzinc authored Mar 20, 2024
1 parent 9351f0f commit 522f823
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions uiautomator2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1900,6 +1900,9 @@ def _fix_wifi_addr(addr: str) -> Optional[str]:
return None
if re.match(r"^https?://", addr): # eg: http://example.org
return addr
# eg: emulator-5554, 127.0.0.1:5555
if addr.startswith('emulator-') or addr.startswith('127.0.0.1:'):
return None

# make a request
# eg: 10.0.0.1, 10.0.0.1:7912
Expand Down

0 comments on commit 522f823

Please sign in to comment.