From c44ad548ebff4b4aaa6c7eafa463a94f638bf9d6 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Tue, 7 Feb 2012 11:28:47 +0100 Subject: Client fallbacks to ipv4 if connection is refused with ipv6 --- lib/ssh/src/ssh.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/ssh') 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}; -- cgit v1.2.3