aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2012-02-07 11:28:47 +0100
committerIngela Anderton Andin <[email protected]>2012-02-10 15:34:28 +0100
commitc44ad548ebff4b4aaa6c7eafa463a94f638bf9d6 (patch)
treeeabaf96bc3f06ac1e25d52885ffb7fab9cae2e3b
parentf5f4a7015569dd5bbd7114d89a370ea1bed09023 (diff)
downloadotp-c44ad548ebff4b4aaa6c7eafa463a94f638bf9d6.tar.gz
otp-c44ad548ebff4b4aaa6c7eafa463a94f638bf9d6.tar.bz2
otp-c44ad548ebff4b4aaa6c7eafa463a94f638bf9d6.zip
Client fallbacks to ipv4 if connection is refused with ipv6
-rw-r--r--lib/ssh/src/ssh.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index eec17fd5d6..c47db64497 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -93,6 +93,9 @@ connect(Host, Port, Options, Timeout) ->
%% might return undefined as the connection manager
%% could allready have terminated, so we will not
%% match the Manager in this case
+ {_, not_connected, {error, econnrefused}} when DisableIpv6 == false ->
+ do_demonitor(MRef, Manager),
+ connect(Host, Port, [{ip_v6_disabled, true} | Options], Timeout);
{_, not_connected, {error, Reason}} ->
do_demonitor(MRef, Manager),
{error, Reason};