Skip to content
This repository has been archived by the owner on Feb 15, 2018. It is now read-only.

Commit

Permalink
fix the weird list/binary behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
gmr committed Jul 30, 2015
1 parent 6a5a2d0 commit 0e504d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/autocluster_consul.erl
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,12 @@ host_sname(Value) ->
Parts = string:tokens(binary_to_list(Value), "."),
case length(Parts) of
1 -> binary_to_list(Value);
_ -> binary_to_list(lists:nth(1, Parts))
_ ->
SName = lists:nth(1, Parts),
case is_list(SName) of
true -> SName;
false -> binary_to_list(SName)
end
end.


Expand Down

0 comments on commit 0e504d0

Please sign in to comment.