From 91040fcec30ab62d358493cc391ca91bb56da8a2 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sat, 15 Jul 2023 16:03:38 +0200 Subject: [PATCH] python: Ignore EINTR in serveloop. --- python3/ashd/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python3/ashd/util.py b/python3/ashd/util.py index 3818e4b..bf32637 100644 --- a/python3/ashd/util.py +++ b/python3/ashd/util.py @@ -161,7 +161,10 @@ def serveloop(handler, sock = 0): and is called once for each received request. """ while True: - req = proto.recvreq(sock) + try: + req = proto.recvreq(sock) + except InterruptedError: + continue if req is None: break try: -- 2.11.0