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

Remove global side effects to socket library #16

Merged
merged 1 commit into from Dec 7, 2016

Conversation

b1naryth1ef
Copy link
Contributor

Previously the get_ip_info function used socket.setdefaulttimeout to
set the socket timeout for its query socket. This function sets the
default socket timeout globally, and thus caused side effects after this
function was called (in any library or code that uses sockets).

This change removes the previous setdefaulttimeout call in favor of
setting the timeout directly on the socket itself.

Previously the get_ip_info function used `socket.setdefaulttimeout` to
set the socket timeout for its query socket. This function sets the
default socket timeout globally, and thus caused side effects after this
function was called.

This change removes the previous setdefaulttimeout call in favor of
setting the timeout directly on the socket itself.
@jtriley jtriley merged commit ab5eb34 into jtriley:develop Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants