[pymorse] fix connect ebadf due to fast thread loop