Please review this at http://codereview.appspot.com/3923044/

Affected files:
  M trytond/protocols/netrpc.py


Index: trytond/protocols/netrpc.py
===================================================================
--- a/trytond/protocols/netrpc.py
+++ b/trytond/protocols/netrpc.py
@@ -30,7 +30,10 @@
             return False
         timeout = 0
         while self.running:
-            (rlist, _, _) = select.select([self.sock], [], [], 1)
+            try:
+                (rlist, _, _) = select.select([self.sock], [], [], 1)
+            except select.error:
+                continue
             if not rlist:
                 timeout += 1
                 if timeout > 600:
@@ -103,7 +106,10 @@
             while self.running:
                 if not int(CONFIG['max_thread']) \
                         or len(self.threads) < int(CONFIG['max_thread']):
-                    (rlist, _, _) = select.select([self.socket], [], [], 1)
+                    try:
+                        (rlist, _, _) = select.select([self.socket],
[], [], 1)
+                    except select.error:
+                        continue
                     if not rlist:
                         continue
                     (clientsocket, _) = self.socket.accept()



-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpO5ECPiIH65.pgp
Description: PGP signature

Reply via email to