From: Fredrik Tolf Date: Sat, 15 Jul 2023 14:03:38 +0000 (+0200) Subject: python: Ignore EINTR in serveloop. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=91040fcec30ab62d358493cc391ca91bb56da8a2;p=ashd.git python: Ignore EINTR in serveloop. --- 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: