diff options
author | Ingela Anderton Andin <[email protected]> | 2012-02-14 15:24:15 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2012-02-14 15:24:15 +0100 |
commit | 4a9cf8de2125832cdc636693ec23f625f195b9e8 (patch) | |
tree | 047d62398df9298ecc66b2c6861c371f811bcb2e /lib/ssh/src/ssh_connection_manager.erl | |
parent | ae4e722461812bb1d7b5d5243c90404a1bcb57be (diff) | |
parent | dc03388dd171db15ba72be2b3d24276c4e2e98b8 (diff) | |
download | otp-4a9cf8de2125832cdc636693ec23f625f195b9e8.tar.gz otp-4a9cf8de2125832cdc636693ec23f625f195b9e8.tar.bz2 otp-4a9cf8de2125832cdc636693ec23f625f195b9e8.zip |
Merge branch 'ia/ssh/crash-report-with-impatient-SFTP-client/OTP-9391' into maint
* ia/ssh/crash-report-with-impatient-SFTP-client/OTP-9391:
Avoid to crash if the remote side closes the connection prematurely
Diffstat (limited to 'lib/ssh/src/ssh_connection_manager.erl')
-rw-r--r-- | lib/ssh/src/ssh_connection_manager.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_connection_manager.erl b/lib/ssh/src/ssh_connection_manager.erl index 9bfd5270da..f729276e65 100644 --- a/lib/ssh/src/ssh_connection_manager.erl +++ b/lib/ssh/src/ssh_connection_manager.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2011. 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 @@ -144,7 +144,7 @@ adjust_window(ConnectionManager, Channel, Bytes) -> cast(ConnectionManager, {adjust_window, Channel, Bytes}). close(ConnectionManager, ChannelId) -> - try call(ConnectionManager, {close, ChannelId}) of + try call(ConnectionManager, {close, ChannelId}) of ok -> ok; {error, channel_closed} -> @@ -604,6 +604,8 @@ call(Pid, Msg, Timeout) -> exit:{timeout, _} -> {error, timeout}; exit:{normal, _} -> + {error, channel_closed}; + exit:{noproc,_} -> {error, channel_closed} end. |