python: Ignore EINTR in serveloop.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 15 Jul 2023 14:03:38 +0000 (16:03 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 15 Jul 2023 14:03:38 +0000 (16:03 +0200)
python3/ashd/util.py

index 3818e4b..bf32637 100644 (file)
@@ -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: