Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout Setting Ignored in Whois Client #37

Open
whydee86 opened this issue Sep 17, 2023 · 2 comments
Open

Timeout Setting Ignored in Whois Client #37

whydee86 opened this issue Sep 17, 2023 · 2 comments

Comments

@whydee86
Copy link

whydee86 commented Sep 17, 2023

Issue Description

The Whois client doesn't seem to respect the timeout settings when making queries. Despite setting the timeout via SetTimeout(), the client operation doesn't timeout as expected.

Steps to Reproduce

  1. Import the Whois client.
  2. Set the timeout using SetTimeout() method.
  3. Make a Whois query.
client := whois.NewClient()
client.SetDialer(proxy.FromEnvironment())
client.SetTimeout(5 * time.Second)
output, err := client.Whois("example.com", *server)

Expected Behavior

The query should timeout after 5 seconds if the server does not respond.

Actual Behavior

The operation does not timeout even after 5 seconds.

Additional Information

  • Go version: go1.20.5
  • Operating System: Ubuntu 22.04.3 LTS
@likexian
Copy link
Owner

Hello @whydee86
I have try and can not reproduce it.

And we do have a testing case to make sure it works, please refer to: https://github.com/likexian/whois/blob/master/whois_test.go#L117


If you think this repository is helpful, please share it with friends, thanks.

@likexian
Copy link
Owner

Hello @whydee86
Sorry, there is really an issue, the timeout of dailer is not updated.
I will try to fixed it.


If you think this repository is helpful, please share it with friends, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants