Closed akissa closed 5 years ago
Hello, thanks for your advice.
Did you catch a whois server like this?
Yes
Will you provide the whois server and query domain for me? I will try to find out how to fix it.
The error appeared when querying the default com.whois-servers.net
for a .com
domain. I fixed it using SetReadDeadline
and a for loop to read from bufio.NewReader
.
I have try this, but it return immediately with "No match for nameserver "COM"."
However, thanks to your advice, and I will consider it.
You need to read it in a loop. https://github.com/akissa/whois-go/blob/master/whois.go#L100
Hello, Thanks to @akissa , this issue have fixed, and I have added ip whois query supported. Feel free to use.
In some cases ioutil.ReadAll (https://github.com/likexian/whois-go/blob/master/whois.go#L99) blocks for ever. Investigation indicates the remote side does not close the connection.