Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

In write_header() use poll if available.#929

Merged
dirk-thomas merged 1 commit intoros:kinetic-develfrom
clearpathrobotics:fix-select-with-poll
Feb 8, 2017
Merged

In write_header() use poll if available.#929
dirk-thomas merged 1 commit intoros:kinetic-develfrom
clearpathrobotics:fix-select-with-poll

Conversation

@deng02
Copy link
Copy Markdown
Contributor

@deng02 deng02 commented Nov 10, 2016

We are hitting the select bug where fileno > 1023
causing an "out of range" error. Changing the select to a
poll where available to support higher numbered fileno.

_, ready, _ = select.select([], [fileno], [])
except ValueError as e:
logger.error("[%s]: select fileno '%s': %s", self.name, str(fileno), str(e))
raise e
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe you can just raise and it will automatically re-raise the current exception.

@mikepurvis
Copy link
Copy Markdown
Member

Looks good to me. 👍

We are hitting the select bug where fileno > 1023
causing an "out of range" error.  Changing the select to a
poll where available to support higher numbered fileno.
@deng02 deng02 force-pushed the fix-select-with-poll branch from 078f999 to 0438fdd Compare November 10, 2016 20:19
@deng02
Copy link
Copy Markdown
Contributor Author

deng02 commented Nov 29, 2016

ping @tfoote @dirk-thomas

@mikepurvis
Copy link
Copy Markdown
Member

Looks like this is a similar kind of change to what's going on in #833. @mgrrx, can you comment?

Am curious to better understand the relationship between this code and the Poller abstraction class seen here:

class Poller(object):

mikepurvis added a commit to clearpathrobotics/ros_comm that referenced this pull request Jan 31, 2017
@dirk-thomas
Copy link
Copy Markdown
Member

Just a though: the code path if poll is not available likely needs to be tested in Windows.

@dirk-thomas dirk-thomas merged commit 33b23bd into ros:kinetic-devel Feb 8, 2017
rsinnet pushed a commit to MisoRobotics/ros_comm that referenced this pull request Jun 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants