aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-02-05 10:55:54 +0100
committerHans Nilsson <[email protected]>2015-02-05 10:55:54 +0100
commit9f6f29e5c58ab9e39a4de3142c9670c925734130 (patch)
tree4f11f92b8bc9b3c0f5618a11d1c0f47bd75eccaf /lib
parentae5d5db20fe1d9b4cae2a19717ef010be1b8097f (diff)
parent6cdbe4b9a3bb89d02f4d4f5cd513615d19191b5d (diff)
downloadotp-9f6f29e5c58ab9e39a4de3142c9670c925734130.tar.gz
otp-9f6f29e5c58ab9e39a4de3142c9670c925734130.tar.bz2
otp-9f6f29e5c58ab9e39a4de3142c9670c925734130.zip
Merge branch 'maint'
* maint: Fix ssh:connect erroneus error msg at timeout
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl2
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl7
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 915060c426..68523aa72b 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -1711,7 +1711,7 @@ handshake(Pid, Ref, Timeout) ->
{error, Reason}
after Timeout ->
stop(Pid),
- {error, Timeout}
+ {error, timeout}
end.
start_timeout(_,_, infinity) ->
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index 415cb9fc9c..cb1b4ae945 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -723,7 +723,7 @@ ssh_connect_arg4_timeout(_Config) ->
%% Wait for client reaction on the connection try:
receive
- {done, Client, {error,_E}, T0} ->
+ {done, Client, {error,timeout}, T0} ->
Msp = ms_passed(T0, now()),
exit(Server,hasta_la_vista___baby),
Low = 0.9*Timeout,
@@ -733,6 +733,11 @@ ssh_connect_arg4_timeout(_Config) ->
Low<Msp, Msp<High -> ok;
true -> {fail, "timeout not within limits"}
end;
+
+ {done, Client, {error,Other}, _T0} ->
+ ct:log("Error message \"~p\" from the client is unexpected.",[{error,Other}]),
+ {fail, "Unexpected error message"};
+
{done, Client, {ok,_Ref}, _T0} ->
{fail,"ssh-connected ???"}
after