aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-06-11 16:31:05 +0200
committerPéter Dimitrov <[email protected]>2019-06-17 15:55:07 +0200
commit3cb0cb717859601de6fbaeb05cd26fbfd485eaa4 (patch)
tree778f6ba5d6a27f61b0691c9148a5a574ca3228a7
parent70a885cfd869612c0f0896390f72a1fd0fd07c23 (diff)
downloadotp-3cb0cb717859601de6fbaeb05cd26fbfd485eaa4.tar.gz
otp-3cb0cb717859601de6fbaeb05cd26fbfd485eaa4.tar.bz2
otp-3cb0cb717859601de6fbaeb05cd26fbfd485eaa4.zip
ssl: Fix run_client_error/1 in ssl_test_lib
Fix run_client_error/1 to properly propagate errors from the test client.
-rw-r--r--lib/ssl/test/ssl_test_lib.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 832f8494c6..d46ba1f787 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -1103,7 +1103,15 @@ run_client_error(Opts) ->
Options = proplists:get_value(options, Opts),
ct:log("~p:~p~nssl:connect(~p, ~p, ~p)~n", [?MODULE,?LINE, Host, Port, Options]),
Error = Transport:connect(Host, Port, Options),
- Pid ! {self(), Error}.
+ case Error of
+ {error, _} ->
+ Pid ! {self(), Error};
+ {ok, _Socket} ->
+ receive
+ {ssl_error, _, {tls_alert, _}} = SslError ->
+ Pid ! {self(), SslError}
+ end
+ end.
accepters(N) ->
accepters([], N).