aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src
diff options
context:
space:
mode:
authorNiclas Eklund <[email protected]>2010-10-28 14:31:01 +0200
committerNiclas Eklund <[email protected]>2010-10-28 14:31:01 +0200
commitde0ce3407717573e9591b086a1829f16ed88d289 (patch)
treef30862fefada34f103c1d5bf3944e701f0448c0c /lib/ssh/src
parent0de086094e295119dafa14eb3b02884a538fedcc (diff)
parent489be05ffa13d66726b3c5d61227294aa1dad992 (diff)
downloadotp-de0ce3407717573e9591b086a1829f16ed88d289.tar.gz
otp-de0ce3407717573e9591b086a1829f16ed88d289.tar.bz2
otp-de0ce3407717573e9591b086a1829f16ed88d289.zip
Merge branch 'maint-r13' into maint-r14
Conflicts: lib/ssh/doc/src/notes.xml lib/ssh/src/ssh.appup.src lib/ssh/src/ssh_system_sup.erl lib/ssh/vsn.mk
Diffstat (limited to 'lib/ssh/src')
-rw-r--r--lib/ssh/src/ssh.appup.src4
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl16
-rw-r--r--lib/ssh/src/ssh_system_sup.erl2
3 files changed, 16 insertions, 6 deletions
diff --git a/lib/ssh/src/ssh.appup.src b/lib/ssh/src/ssh.appup.src
index 21f7508555..619b4b736f 100644
--- a/lib/ssh/src/ssh.appup.src
+++ b/lib/ssh/src/ssh.appup.src
@@ -19,9 +19,11 @@
{"%VSN%",
[
+ {"2.0.1", [{restart_application, ssh}]}
],
[
- ]
+ {"2.0.1", [{restart_application, ssh}]}
+ ]
}.
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index d46002c494..0ba11b0a26 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -705,11 +705,19 @@ generate_event(<<?BYTE(Byte), _/binary>> = Msg, StateName,
Byte == ?SSH_MSG_CHANNEL_REQUEST;
Byte == ?SSH_MSG_CHANNEL_SUCCESS;
Byte == ?SSH_MSG_CHANNEL_FAILURE ->
- ssh_connection_manager:event(Pid, Msg),
- State = generate_event_new_state(State0, EncData),
- next_packet(State),
- {next_state, StateName, State};
+ try
+ ssh_connection_manager:event(Pid, Msg),
+ State = generate_event_new_state(State0, EncData),
+ next_packet(State),
+ {next_state, StateName, State}
+ catch
+ exit:{noproc, _Reason} ->
+ Report = io_lib:format("~p Connection Handler terminated: ~p~n",
+ [self(), Pid]),
+ error_logger:info_report(Report),
+ {stop, normal, State0}
+ end;
generate_event(Msg, StateName, State0, EncData) ->
Event = ssh_bits:decode(Msg),
State = generate_event_new_state(State0, EncData),
diff --git a/lib/ssh/src/ssh_system_sup.erl b/lib/ssh/src/ssh_system_sup.erl
index f4570b8a48..920baaadef 100644
--- a/lib/ssh/src/ssh_system_sup.erl
+++ b/lib/ssh/src/ssh_system_sup.erl
@@ -85,7 +85,7 @@ start_subsystem(SystemSup, Options) ->
supervisor:start_child(SystemSup, Spec).
stop_subsystem(SystemSup, SubSys) ->
- case lists:keyfind(SubSys, 2, supervisor:which_children(SystemSup)) of
+ case catch lists:keyfind(SubSys, 2, supervisor:which_children(SystemSup)) of
false ->
{error, not_found};
{Id, _, _, _} ->