Set waiting connection on select instead of accept for issue1625

SIGINT seems to not stop accept call
This commit is contained in:
Phillip Heller committed 2010-09-25 11:42:43 -04:00
1 parent d1475e74f9
commit e77d1851ff
1 file changed
+3
+3
View File
@@ -102,6 +102,9 @@ class NetRPCServerThread(threading.Thread):
while self.running:
if not int(CONFIG['max_thread']) \
or len(self.threads) < int(CONFIG['max_thread']):
(rlist, _, _) = select.select([self.socket], [], [], 1)
if not rlist:
continue
(clientsocket, _) = self.socket.accept()
c_thread = NetRPCClientThread(clientsocket, self.threads,
self.secure)