Skip to content

Commit

Permalink
Better handling of IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
IngelaAndin committed Feb 10, 2012
1 parent 647ef86 commit 3c3356e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/ssh/src/ssh.erl
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,13 @@ handle_options([Opt | Rest], SockOpts, Opts) ->
inetopt(true) ->
inet;
inetopt(false) ->
inet6.
case gen_tcp:listen(0, [inet6, {ip, loopback}]) of
{ok, Dummyport} ->
gen_tcp:close(Dummyport),
inet6;
_ ->
inet
end.

%%%
%% Deprecated
Expand Down

0 comments on commit 3c3356e

Please sign in to comment.