Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: filedescriptor out of range in select() #984

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ansible_mitogen/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ class Broker(mitogen.master.Broker):
the exuberant syscall expense of EpollPoller, so override it and restore
the poll() poller.
"""
poller_class = mitogen.core.Poller
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just noticed the above docstring mentions "does not need the exuberant syscall expense of EpollPoller, so override it and restore the poll() poller" written by dw in 7b129e8. That predates Poller switching from select.poll() to select.select() in 9bcd2ec.

Your approach using if/else, instead of PREFERRED_POLLER makes more sense now.


if mitogen.parent.PollPoller.SUPPORTED:
poller_class = mitogen.parent.PollPoller
else:
poller_class = mitogen.core.Poller

class Binding(object):
"""
Expand Down