utkarshkukreti / whois.ex

Pure Elixir WHOIS client and parser.
27 stars 16 forks source link

Gracefully handle connection timeouts for registrars that point to non-functional WHOIS servers #15

Closed s3cur3 closed 5 months ago

s3cur3 commented 5 months ago

This fixes an issue see with the pairdomains.com registrar, whose WHOIS record terminate with a record that includes this:

    Registrar WHOIS Server: pairdomains.com

The actual WHOIS server for the registrar is whois.pairdomains.com, so prior to this patch, Whois.lookup/1 would fail after 60 seconds with {:error, :timed_out}. Now, we'll fall back to the most recent successfully retrieved record after :connect_timeout (10 seconds by default).

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4e78f29) 91.02% compared to head (60964d0) 91.02%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #15 +/- ## ======================================= Coverage 91.02% 91.02% ======================================= Files 3 3 Lines 78 78 ======================================= Hits 71 71 Misses 7 7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.