Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix network.py Intermittent Threaded Usage Failures due to Python Built-In Bug #56

Merged
merged 3 commits into from
Sep 12, 2020

Conversation

malbers15
Copy link
Contributor

No description provided.

@malbers15 malbers15 changed the title Fix network.py Intermittent Threaded Usage Failures due to Python Builti-In Bug Fix network.py Intermittent Threaded Usage Failures due to Python Built-In Bug Sep 2, 2020
@malbers15
Copy link
Contributor Author

malbers15 commented Sep 2, 2020

@alessandromaggio
socket.getprotobyname() is not thread safe due to a python a bug in python that affects 3.5, 3.6, and 3.7:
https://bugs.python.org/issue30482
"socket.getservbyname(), socket.getservbyport(), socket.getprotobyname() are not threadsafe"

This was causing intermittent wrong returns of socket.getprotobyname('icmp') (it would return a 0 incorrectly instead of 1 in the occasional cases this was seen in multi-threaded usage).

Issue was found and explained in this pythonping issue:
#40

…nary to be more efficient and faster for lookup
@alessandromaggio alessandromaggio merged commit b337b5a into alessandromaggio:master Sep 12, 2020
@alessandromaggio
Copy link
Owner

Integrated into release 1.0.14.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants