This commit is contained in:
Michael Klishin 2021-01-28 18:23:38 +03:00
parent 9048bc0c36
commit 210a032eb8
No known key found for this signature in database
GPG Key ID: E80EDCFA0CDB21EE
1 changed files with 2 additions and 2 deletions

View File

@ -164,10 +164,10 @@ inet_address_preference() ->
gethostaddr(Host) ->
resolve_address(Host, inet_address_preference()).
resolve_address(Host, [Family | Other]) ->
resolve_address(Host, [Family | Remaining]) ->
case inet:getaddr(Host, Family) of
{ok, IP} -> {IP, Family};
_ -> resolve_address(Host, Other)
_ -> resolve_address(Host, Remaining)
end;
resolve_address(_Host, []) ->
{error, unknown_host}.