aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/examples/src/client_server.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-02-25 11:45:03 +0100
committerIngela Anderton Andin <[email protected]>2016-02-25 11:45:03 +0100
commit95811d8f832076c329166fb529394ca015266ea2 (patch)
treeaa7d4d19b060a1e03e85314fb593d6b307cfb112 /lib/ssl/examples/src/client_server.erl
parent13411a7783355f9d2f40acd6859955e0f233a96e (diff)
parent87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba (diff)
downloadotp-95811d8f832076c329166fb529394ca015266ea2.tar.gz
otp-95811d8f832076c329166fb529394ca015266ea2.tar.bz2
otp-95811d8f832076c329166fb529394ca015266ea2.zip
Merge branch 'maint'
Diffstat (limited to 'lib/ssl/examples/src/client_server.erl')
-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