diff --git a/alune/adb.py b/alune/adb.py index 16a52a1..ac16d46 100644 --- a/alune/adb.py +++ b/alune/adb.py @@ -79,6 +79,10 @@ async def scan_localhost_devices(self) -> int | None: connections = [ conn for conn in psutil.net_connections("tcp4") if conn.laddr.port >= 5555 and conn.status == "LISTEN" ] + + if len(connections) > 9: + logger.warning(f"There are {len(connections)} open ports, scanning may take a while.") + for conn in connections: logger.debug(f"Scanning port {conn.laddr.port} for ADB...") try: