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 (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.