Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Currently Python TNonblockingServer uses select.select to monitor the IO of all existing connections. The value of file descriptors monitored by select() is limited to be lower than FD_SETSIZE (1024). Any file desciptor higher than 1024, when passed into select.select, will trigger the "fd out of range" error.
Switching to select.poll can solve this problem. However, as noted in the official documentation, select.poll is not supported in all operating system. We should also check whether the current system has poll in the select module, and use poll if it's available.