0

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?

user9371654
  • 2,160
  • 16
  • 45
  • 78

0 Answers0