diff options
author | Ingela Anderton Andin <[email protected]> | 2018-12-04 09:45:17 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-12-04 09:45:17 +0100 |
commit | c44f975ac30e652ae08b878edf22bac3b6a1c8a2 (patch) | |
tree | 09219f37d54428321c86dbe8ecab86286f0d7b43 /lib/ssl/test | |
parent | 19c6875fb10935864f6f28607c61700eaf56c59a (diff) | |
parent | 6558b668f630cda7bd3f4d81418b17843b5bbbf3 (diff) | |
download | otp-c44f975ac30e652ae08b878edf22bac3b6a1c8a2.tar.gz otp-c44f975ac30e652ae08b878edf22bac3b6a1c8a2.tar.bz2 otp-c44f975ac30e652ae08b878edf22bac3b6a1c8a2.zip |
Merge branch 'ingela/ssl/dist/active-N/OTP-15449' into maint
* ingela/ssl/dist/active-N/OTP-15449:
ssl: Fix error handling in function passive_receive
ssl: Correct ssl:shutdown
ssl: Internaly use {active, N}
Diffstat (limited to 'lib/ssl/test')
-rw-r--r-- | lib/ssl/test/ssl_basic_SUITE.erl | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl index 6f668f0c00..9633800da5 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"}]. @@ -5220,14 +5223,14 @@ get_invalid_inet_option(Socket) -> tls_shutdown_result(Socket, server) -> ssl:send(Socket, "Hej"), - ssl:shutdown(Socket, write), + ok = ssl:shutdown(Socket, write), {ok, "Hej hopp"} = ssl:recv(Socket, 8), ok; tls_shutdown_result(Socket, client) -> - {ok, "Hej"} = ssl:recv(Socket, 3), ssl:send(Socket, "Hej hopp"), - ssl:shutdown(Socket, write), + ok = ssl:shutdown(Socket, write), + {ok, "Hej"} = ssl:recv(Socket, 3), ok. tls_shutdown_write_result(Socket, server) -> |