I have a very large list of domain names that I want to use python's socket.gethostbyname(hostname) to resolve the domain names to IPv4. 
I do not want the loop to get stuck. do I need to set timeout? please note that when I tried socket.close() I got an error (see the post here).
The question is: do I need to set time out? is there any default time out?
