From 868b0f956f5e7de221a4b56a74dd56f6237fa345 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Thu, 25 Aug 2022 10:39:15 +0800 Subject: [PATCH] catch brokePipeError --- tidevice/_device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tidevice/_device.py b/tidevice/_device.py index 95bac46..29ccd30 100644 --- a/tidevice/_device.py +++ b/tidevice/_device.py @@ -788,7 +788,8 @@ def _connect_testmanagerd_lockdown(self) -> DTXService: return DTXService(conn) # 2022-08-24 add retry delay, looks like sometime can recover - @retry((ssl.SSLError, socket.timeout), delay=10, jitter=1, tries=3, logger=logging) + # BrokenPipeError(ConnectionError) + @retry((ssl.SSLError, socket.timeout, BrokenPipeError), delay=10, jitter=1, tries=3, logger=logging) def connect_instruments(self) -> ServiceInstruments: """ start service for instruments """ if self.major_version() >= 14: