aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/examples/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-02-25 11:44:13 +0100
committerIngela Anderton Andin <[email protected]>2016-02-25 11:44:13 +0100
commit87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba (patch)
tree4d717a93b03c7ec5b24bc588ae96af25dccfb134 /lib/ssl/examples/src
parent930996a0613b841a0d026100e5b4659d5269e80c (diff)
parentdf597b37df56c78383601135bab16a46739d8c86 (diff)
downloadotp-87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba.tar.gz
otp-87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba.tar.bz2
otp-87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba.zip
Merge branch 'legoscia/fix-ssl-example/PR-976/OTP-13363' into maint
* legoscia/fix-ssl-example/PR-976/OTP-13363: ssl: Modernize utility function Fix ssl example
Diffstat (limited to 'lib/ssl/examples/src')
-rw-r--r--lib/ssl/examples/src/client_server.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ssl/examples/src/client_server.erl b/lib/ssl/examples/src/client_server.erl
index 799027123f..019b5130d2 100644
--- a/lib/ssl/examples/src/client_server.erl
+++ b/lib/ssl/examples/src/client_server.erl
@@ -26,9 +26,7 @@
start() ->
%% Start ssl application
- application:start(crypto),
- application:start(public_key),
- application:start(ssl),
+ {ok, StartedApps} = application:ensure_all_started(ssl),
%% Let the current process be the server that listens and accepts
%% Listen
@@ -52,7 +50,8 @@ start() ->
ssl:close(ASock),
io:fwrite("Listen: closing and terminating.~n"),
ssl:close(LSock),
- application:stop(ssl).
+
+ lists:foreach(fun application:stop/1, lists:reverse(StartedApps)).
%% Client connect