diff --git a/pymobiledevice3/service_connection.py b/pymobiledevice3/service_connection.py index cd143c0d..548a74d0 100755 --- a/pymobiledevice3/service_connection.py +++ b/pymobiledevice3/service_connection.py @@ -177,7 +177,10 @@ def recv(self, length: int = 4096) -> bytes: :param length: The maximum amount of data to receive. :return: The received data. """ - return self.socket.recv(length) + try: + return self.socket.recv(length) + except ssl.SSLError: + raise ConnectionAbortedError() def sendall(self, data: bytes) -> None: """