aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_connection_handler.erl
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/ssh_connection_handler.erl
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/ssh_connection_handler.erl')
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl16
1 files changed, 12 insertions, 4 deletions
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),