diff options
author | Siri Hansen <[email protected]> | 2012-08-20 10:03:21 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2012-08-20 10:03:21 +0200 |
commit | 9dfedc025906ad3f56ae130fec3e9de7ee380a1e (patch) | |
tree | fedc0901e54794798cfa2dbc36b4121c91e1ee7c /lib/common_test/src/ct_netconfc.erl | |
parent | f11a10e75d7f3b49a58ac225d624ac6654e23870 (diff) | |
download | otp-9dfedc025906ad3f56ae130fec3e9de7ee380a1e.tar.gz otp-9dfedc025906ad3f56ae130fec3e9de7ee380a1e.tar.bz2 otp-9dfedc025906ad3f56ae130fec3e9de7ee380a1e.zip |
[common_test] Handle all ssh_cm messages in ct_netconfc:handle_msg/2
Only {data,...} and {closed,...} was handled, which caused the test to
fail with with a function_clause crash in ct_netconfc when
{exit_status,...} was received. This has been corrected.
Diffstat (limited to 'lib/common_test/src/ct_netconfc.erl')
-rw-r--r-- | lib/common_test/src/ct_netconfc.erl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/common_test/src/ct_netconfc.erl b/lib/common_test/src/ct_netconfc.erl index d9c4a962dc..5f8bae89fa 100644 --- a/lib/common_test/src/ct_netconfc.erl +++ b/lib/common_test/src/ct_netconfc.erl @@ -1074,12 +1074,18 @@ handle_msg({get_event_streams=Op,Streams,Timeout}, From, State) -> handle_msg({ssh_cm, _CM, {data, _Ch, _Type, Data}}, State) -> handle_data(Data, State); -handle_msg({ssh_cm, _CM, {closed,_Ch}}, State) -> - %% This will happen if the server terminates the connection, as in - %% kill-session (or if ssh:close is called from somewhere +handle_msg({ssh_cm, _CM, _SshCloseMsg}, State) -> + %% _SshCloseMsg can probably be one of + %% {eof,Ch} + %% {exit_status,Ch,Status} + %% {exit_signal,Ch,ExitSignal,ErrorMsg,LanguageString} + %% {signal,Ch,Signal} + + %% This might e.g. happen if the server terminates the connection, + %% as in kill-session (or if ssh:close is called from somewhere %% unexpected). - %%! Log this?? - i.e. as server closing the connection + %%! Log this?? %%! Currently the log will say that the client closed the %%! connection - due to terminate/2 |