diff options
author | Ingela Anderton Andin <[email protected]> | 2012-02-22 12:07:11 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2012-02-28 10:26:56 +0100 |
commit | 1aeb8f4234b52705f9a933abf8dcd1afb2296b9d (patch) | |
tree | 1b866333a0d627ff2e321d638ace080098f2f6ce /lib/ssh/src/ssh_subsystem_sup.erl | |
parent | 76cf3d914cadc98ead9889b66d2812a46fb5d5b2 (diff) | |
download | otp-1aeb8f4234b52705f9a933abf8dcd1afb2296b9d.tar.gz otp-1aeb8f4234b52705f9a933abf8dcd1afb2296b9d.tar.bz2 otp-1aeb8f4234b52705f9a933abf8dcd1afb2296b9d.zip |
Prevent client hanging. (OTP-8111)
Restored supervisor tree so that error propagation will work as
intended, although connection processes are set to temporary, instead
of permanent with restart times set to 0, and termination of the
connection subtree is initiated by a temporary process spawned by
ssh_connection_managers terminate. This is done to avoid unwanted
supervisor reports. Pherhaps we need some new supervisor
functionality.
Diffstat (limited to 'lib/ssh/src/ssh_subsystem_sup.erl')
-rw-r--r-- | lib/ssh/src/ssh_subsystem_sup.erl | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/ssh/src/ssh_subsystem_sup.erl b/lib/ssh/src/ssh_subsystem_sup.erl index d71b6bbc56..cd6defd535 100644 --- a/lib/ssh/src/ssh_subsystem_sup.erl +++ b/lib/ssh/src/ssh_subsystem_sup.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. 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 @@ -70,13 +70,12 @@ ssh_connectinon_child_spec(Opts) -> Address = proplists:get_value(address, Opts), Port = proplists:get_value(port, Opts), Role = proplists:get_value(role, Opts), - Name = id(Role, ssh_connection_controler, Address, Port), - StartFunc = {ssh_connection_controler, start_link, [Opts]}, + Name = id(Role, ssh_connection_sup, Address, Port), + StartFunc = {ssh_connection_sup, start_link, [Opts]}, Restart = transient, -% Restart = permanent, Shutdown = 5000, - Modules = [ssh_connection_controler], - Type = worker, + Modules = [ssh_connection_sup], + Type = supervisor, {Name, StartFunc, Restart, Shutdown, Type, Modules}. ssh_channel_child_spec(Opts) -> @@ -86,7 +85,6 @@ ssh_channel_child_spec(Opts) -> Name = id(Role, ssh_channel_sup, Address, Port), StartFunc = {ssh_channel_sup, start_link, [Opts]}, Restart = transient, -% Restart = permanent, Shutdown = infinity, Modules = [ssh_channel_sup], Type = supervisor, @@ -95,7 +93,7 @@ ssh_channel_child_spec(Opts) -> id(Role, Sup, Address, Port) -> {Role, Sup, Address, Port}. -ssh_connection_sup([{_, Child, _, [ssh_connection_controler]} | _]) -> +ssh_connection_sup([{_, Child, _, [ssh_connection_sup]} | _]) -> Child; ssh_connection_sup([_ | Rest]) -> ssh_connection_sup(Rest). |