richardpenman / whois

MIT License
382 stars 187 forks source link

[Feature Request] Timeout in whois api #240

Open kalpeshmantri opened 1 month ago

kalpeshmantri commented 1 month ago

Is it possible to add atimeout in whois API, something like:

# Set a 3-second timeout for the WHOIS request
whois.whois(domain, timeout=3)

I currently use socket.setdefaulttimeout(3) to set a global timeout for all socket connections, but it affects all system processes that use sockets.

Thank you for consideration !

richardpenman commented 2 weeks ago

Good idea - a PR to support this would be very welcome