Set waiting connection on select instead of accept for issue1625
SIGINT seems to not stop accept call
This commit is contained in:
1 parent
d1475e74f9
commit
e77d1851ff
1 file changed
+3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user