diff options
author | Hans Nilsson <[email protected]> | 2016-04-07 16:30:35 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-04-28 20:37:30 +0200 |
commit | b90f22861404f2a2cdd305055c786bb73464af01 (patch) | |
tree | 0f22a7b8b122e3ac6c1a7f52daeaa56d24bf9584 /lib/ssh/src/ssh_system_sup.erl | |
parent | b9e3e212009162d8223436032282efbc5c826cc7 (diff) | |
download | otp-b90f22861404f2a2cdd305055c786bb73464af01.tar.gz otp-b90f22861404f2a2cdd305055c786bb73464af01.tar.bz2 otp-b90f22861404f2a2cdd305055c786bb73464af01.zip |
ssh: make ssh:daemon choose port when Port=0 in the arguments
Diffstat (limited to 'lib/ssh/src/ssh_system_sup.erl')
-rw-r--r-- | lib/ssh/src/ssh_system_sup.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_system_sup.erl b/lib/ssh/src/ssh_system_sup.erl index 6314671f0d..9a9786a914 100644 --- a/lib/ssh/src/ssh_system_sup.erl +++ b/lib/ssh/src/ssh_system_sup.erl @@ -192,6 +192,9 @@ stop_acceptor(Sup) -> [{Name, AcceptorSup}] = [{SupName, ASup} || {SupName, ASup, _, [ssh_acceptor_sup]} <- supervisor:which_children(Sup)], - supervisor:terminate_child(AcceptorSup, Name). - - + case supervisor:terminate_child(AcceptorSup, Name) of + ok -> + supervisor:delete_child(AcceptorSup, Name); + Error -> + Error + end. |