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

Add TCP_INFO availability check#1211

Merged
dirk-thomas merged 2 commits intoros:lunar-develfrom
otamachan:check_TCP_INFO
Feb 1, 2018
Merged

Add TCP_INFO availability check#1211
dirk-thomas merged 2 commits intoros:lunar-develfrom
otamachan:check_TCP_INFO

Conversation

@otamachan
Copy link
Copy Markdown
Contributor

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

@dirk-thomas
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 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