Skip to content

Commit

Permalink
Merge pull request #28 from RoadRunnr/master
Browse files Browse the repository at this point in the history
catch nxdomain in epmdless_static
  • Loading branch information
tsloughter authored Apr 4, 2024
2 parents e7f89b7 + 3e20371 commit 63b832e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/epmdless_static.erl
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ port_please(_Name, _Host) ->
{error, noport}
end.

%% @doc Resolves the Host to an IP address of a remote node.
address_please(Name, Host, AddressFamily) ->
{ok, Address} = inet:getaddr(Host, AddressFamily),
case port_please(Name, Address) of
{port, Port, Version} ->
{ok, Address, Port, Version};
{error, noport} ->
{error, noport}
case inet:getaddr(Host, AddressFamily) of
{ok, Address} ->
case port_please(Name, Address) of
{port, Port, Version} ->
{ok, Address, Port, Version};
noport ->
{error, noport}
end;
{error, Reason} ->
{error, Reason}
end.

%% @doc Returns the port the local node should listen to when accepting new distribution requests.
Expand Down

1 comment on commit 63b832e

@zinid
Copy link

@zinid zinid commented on 63b832e Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please bump the version and update it in hex.pm? This is an important change for our company.

Please sign in to comment.