utkarshkukreti / whois.ex

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

:badarg error when querying .co domain names #6

Closed sfusato closed 6 months ago

sfusato commented 1 year ago
iex> Whois.lookup("test.co")
** (exit) :badarg
    (kernel 8.0) gen_tcp.erl:171: :gen_tcp.connect/4
    (whois 0.1.1) lib/whois.ex:33: Whois.lookup_raw/2
    (whois 0.1.1) lib/whois.ex:47: Whois.lookup_raw/2
    (whois 0.1.1) lib/whois.ex:13: Whois.lookup/2

The next_server case call returns an empty string which then gets catched by the last clause attempting a new lookup with a server host name that is an empty string, thus throwing the above error.