Set non-blocking mode on server sockets, for Jython's sake. jython
authorFredrik Tolf <fredrik@dolda2000.com>
Fri, 18 Jan 2013 22:16:35 +0000 (23:16 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Fri, 18 Jan 2013 22:16:35 +0000 (23:16 +0100)
pdm/srv.py

index 8eb11f5..9b8d77b 100644 (file)
@@ -465,6 +465,7 @@ class unixlistener(listener):
             if self.group is not None:
                 os.chown(self.name, os.getuid(), grp.getgrnam(self.group).gr_gid)
             sk.listen(16)
+            sk.setblocking(False)
             self.listen(sk)
         finally:
             sk.close()
@@ -487,6 +488,7 @@ class tcplistener(listener):
         try:
             sk.bind((self.bindaddr, self.port))
             sk.listen(16)
+            sk.setblocking(False)
             self.listen(sk)
         finally:
             sk.close()