HRCPP-66 EBADF for large number of clients

Replace select() with poll() to avoid the FD_SETSIZE limit.