diff options
author | Henrik Nord <[email protected]> | 2014-09-30 09:39:51 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2014-09-30 09:39:51 +0200 |
commit | 88d5c0edbd08e069bc20cf13fa90bca59eb43e86 (patch) | |
tree | bef481b72ffa142b7a9fb1ee9e5be969e3e7093e /lib/ssh/src/ssh_acceptor_sup.erl | |
parent | 6b240f6d882a10707ff2dea4e171a2d9599b3746 (diff) | |
parent | ee24a87a779d8d10461cadd47b3eb276e70baef8 (diff) | |
download | otp-88d5c0edbd08e069bc20cf13fa90bca59eb43e86.tar.gz otp-88d5c0edbd08e069bc20cf13fa90bca59eb43e86.tar.bz2 otp-88d5c0edbd08e069bc20cf13fa90bca59eb43e86.zip |
Merge branch 'maint-17' into maint
Conflicts:
OTP_VERSION
lib/ssh/test/ssh_connection_SUITE.erl
Diffstat (limited to 'lib/ssh/src/ssh_acceptor_sup.erl')
-rw-r--r-- | lib/ssh/src/ssh_acceptor_sup.erl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/ssh/src/ssh_acceptor_sup.erl b/lib/ssh/src/ssh_acceptor_sup.erl index 2be729d305..46fdef07d0 100644 --- a/lib/ssh/src/ssh_acceptor_sup.erl +++ b/lib/ssh/src/ssh_acceptor_sup.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2013. All Rights Reserved. +%% Copyright Ericsson AB 2008-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -26,7 +26,7 @@ -module(ssh_acceptor_sup). -behaviour(supervisor). --export([start_link/1, start_child/2, stop_child/2]). +-export([start_link/1, start_child/2, stop_child/3]). %% Supervisor callback -export([init/1]). @@ -45,18 +45,17 @@ start_child(AccSup, ServerOpts) -> {error, already_present} -> Address = proplists:get_value(address, ServerOpts), Port = proplists:get_value(port, ServerOpts), - Name = id(Address, Port), - supervisor:delete_child(?MODULE, Name), + stop_child(AccSup, Address, Port), supervisor:start_child(AccSup, Spec); Reply -> Reply end. -stop_child(Address, Port) -> +stop_child(AccSup, Address, Port) -> Name = id(Address, Port), - case supervisor:terminate_child(?MODULE, Name) of + case supervisor:terminate_child(AccSup, Name) of ok -> - supervisor:delete_child(?MODULE, Name); + supervisor:delete_child(AccSup, Name); Error -> Error end. |