F
Fortepianissimo
I've tried using
socket.setdefaulttimeout(timeout)
to set the default timeout to 'timeout' for all sockets. The part
that's not clear to me, is that if this will affect
socket.gethostbyname(). In my observation the timeout setting did not
affect the DNS lookup.
It might be my misunderstanding of the semantics here: would
setdefaulttimeout() only applies to any socket object newly created?
So gethostbyname() doesn't create a new socket (explicitly at least)
so timeout doesn't apply there? What should I do to get the intended
behavior?
Thanks a bunch!
socket.setdefaulttimeout(timeout)
to set the default timeout to 'timeout' for all sockets. The part
that's not clear to me, is that if this will affect
socket.gethostbyname(). In my observation the timeout setting did not
affect the DNS lookup.
It might be my misunderstanding of the semantics here: would
setdefaulttimeout() only applies to any socket object newly created?
So gethostbyname() doesn't create a new socket (explicitly at least)
so timeout doesn't apply there? What should I do to get the intended
behavior?
Thanks a bunch!