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

Add TCP_INFO availability check #1211

Merged
merged 2 commits into from
Feb 1, 2018

Conversation

otamachan
Copy link
Contributor

As using TCP_INFO is not a portable code (#1207), check its availability before using.

@dirk-thomas
Copy link
Member

Thank you for the quick fix.

@Yay295 can you please try this patch and comment if it works around the problem you have with WSL.

@Yay295
Copy link
Contributor

Yay295 commented Oct 31, 2017

Unfortunately not. This isn't a Python problem, so hasattr(socket, 'TCP_INFO') is True. I might be able to catch it in a try-except though.

@dirk-thomas
Copy link
Member

@Yay295 Can you please propose a PR with a patch which works for you.

@dirk-thomas dirk-thomas added the bug label Feb 1, 2018
@dirk-thomas
Copy link
Member

Thank you for the patch. I changed the logic in e5112a7 in order to simplify the diff.

@dirk-thomas dirk-thomas merged commit c721fdb into ros:lunar-devel Feb 1, 2018
dirk-thomas pushed a commit that referenced this pull request Feb 9, 2018
* Add TCP_INFO availability check

* simplify diff / patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants