diff options
author | Ingela Anderton Andin <[email protected]> | 2018-11-19 13:50:35 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-12-03 19:42:07 +0100 |
commit | 6168cf2f5f8b5839b1a56ce870658d76faf3c22f (patch) | |
tree | 9333480a078138395129acb89cdce3a7acb8ef6d /lib/ssl/test | |
parent | 19c6875fb10935864f6f28607c61700eaf56c59a (diff) | |
download | otp-6168cf2f5f8b5839b1a56ce870658d76faf3c22f.tar.gz otp-6168cf2f5f8b5839b1a56ce870658d76faf3c22f.tar.bz2 otp-6168cf2f5f8b5839b1a56ce870658d76faf3c22f.zip |
ssl: Internaly use {active, N}
Make next_record an internal help function to next_event and avoid
duplicate calls to tls_socket:setopts for setting the active option.
Diffstat (limited to 'lib/ssl/test')
-rw-r--r-- | lib/ssl/test/ssl_basic_SUITE.erl | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl index 6f668f0c00..d93bd85c76 100644 --- a/lib/ssl/test/ssl_basic_SUITE.erl +++ b/lib/ssl/test/ssl_basic_SUITE.erl @@ -1097,16 +1097,19 @@ tls_closed_in_active_once(Config) when is_list(Config) -> end. tls_closed_in_active_once_loop(Socket) -> - ssl:setopts(Socket, [{active, once}]), - receive - {ssl, Socket, _} -> - tls_closed_in_active_once_loop(Socket); - {ssl_closed, Socket} -> - ok - after 5000 -> - no_ssl_closed_received + case ssl:setopts(Socket, [{active, once}]) of + ok -> + receive + {ssl, Socket, _} -> + tls_closed_in_active_once_loop(Socket); + {ssl_closed, Socket} -> + ok + after 5000 -> + no_ssl_closed_received + end; + {error, closed} -> + ok end. - %%-------------------------------------------------------------------- connect_dist() -> [{doc,"Test a simple connect as is used by distribution"}]. |