diff options
author | Ingela Anderton Andin <[email protected]> | 2015-09-23 18:28:03 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-09-23 18:28:03 +0200 |
commit | 71501e4307e78805bda531c78352913d12e1dfc9 (patch) | |
tree | 597839637a2f34b7ef48dbf94a9f5c9eeba6b6dd /lib/ssl/test | |
parent | 1523be48ab4071b158412f4b06fe9c8d6ba3e73c (diff) | |
parent | e67f7ea7d62d8addc0a06447ddb28d425d3f650d (diff) | |
download | otp-71501e4307e78805bda531c78352913d12e1dfc9.tar.gz otp-71501e4307e78805bda531c78352913d12e1dfc9.tar.bz2 otp-71501e4307e78805bda531c78352913d12e1dfc9.zip |
Merge branch 'ia/ssl/econnreset-test-cuddle' into maint
* ia/ssl/econnreset-test-cuddle:
ssl: Retry ssl connections on econnreset errors
Diffstat (limited to 'lib/ssl/test')
-rw-r--r-- | lib/ssl/test/ssl_test_lib.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl index ba8588f2f9..f25f6f9425 100644 --- a/lib/ssl/test/ssl_test_lib.erl +++ b/lib/ssl/test/ssl_test_lib.erl @@ -226,6 +226,17 @@ run_client(Opts) -> ct:log("~p:~p~nClient faild several times: connection failed: ~p ~n", [?MODULE,?LINE, Reason]), Pid ! {self(), {error, Reason}} end; + {error, econnreset = Reason} -> + case get(retries) of + N when N < 5 -> + ct:log("~p:~p~neconnreset retries=~p sleep ~p",[?MODULE,?LINE, N,?SLEEP]), + put(retries, N+1), + ct:sleep(?SLEEP), + run_client(Opts); + _ -> + ct:log("~p:~p~nClient faild several times: connection failed: ~p ~n", [?MODULE,?LINE, Reason]), + Pid ! {self(), {error, Reason}} + end; {error, Reason} -> ct:log("~p:~p~nClient: connection failed: ~p ~n", [?MODULE,?LINE, Reason]), Pid ! {connect_failed, Reason}; |