From ad6dd73a032517651d6e029163628d67039a36d2 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 5 Apr 2018 11:27:12 +0200 Subject: [PATCH] do not catch OSError in pipe.send (fix ANR on some versions of Android) --- lib/interface.py | 4 ++-- lib/util.py | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/interface.py b/lib/interface.py index 9155640b3..1847602b0 100644 --- a/lib/interface.py +++ b/lib/interface.py @@ -297,8 +297,8 @@ class Interface(util.PrintError): wire_requests = self.unsent_requests[0:n] try: self.pipe.send_all([make_dict(*r) for r in wire_requests]) - except socket.error as e: - self.print_error("socket error:", e) + except BaseException as e: + self.print_error("pipe send error:", e) return False self.unsent_requests = self.unsent_requests[n:] for request in wire_requests: diff --git a/lib/util.py b/lib/util.py index 1c12747eb..68067c435 100644 --- a/lib/util.py +++ b/lib/util.py @@ -736,10 +736,6 @@ class SocketPipe: print_error("SSLError:", e) time.sleep(0.1) continue - except OSError as e: - print_error("OSError", e) - time.sleep(0.1) - continue class QueuePipe: