diff options
author | Hans Nilsson <[email protected]> | 2016-10-31 10:06:53 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-10-31 10:06:53 +0100 |
commit | 3ec1b3666c14acdc585da6453101b61cb4c69270 (patch) | |
tree | ca4a04953403153960c4545b4f186d8e484addb3 /lib/ssh/src | |
parent | 07bce649026307c15a05e03c39dc5c1601d28603 (diff) | |
parent | 11ff9b33aac196798b33849cab5c1bf4efb01755 (diff) | |
download | otp-3ec1b3666c14acdc585da6453101b61cb4c69270.tar.gz otp-3ec1b3666c14acdc585da6453101b61cb4c69270.tar.bz2 otp-3ec1b3666c14acdc585da6453101b61cb4c69270.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/ssh/src')
-rw-r--r-- | lib/ssh/src/ssh_channel.erl | 2 | ||||
-rw-r--r-- | lib/ssh/src/ssh_dbg.erl | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_channel.erl b/lib/ssh/src/ssh_channel.erl index 426e2f5125..85b31f3669 100644 --- a/lib/ssh/src/ssh_channel.erl +++ b/lib/ssh/src/ssh_channel.erl @@ -261,7 +261,7 @@ handle_info({ssh_cm, _, _} = Msg, #state{cm = ConnectionManager, adjust_window(Msg), {noreply, State#state{channel_state = ChannelState}, Timeout}; {stop, ChannelId, ChannelState} -> - ssh_connection:close(ConnectionManager, ChannelId), + catch ssh_connection:close(ConnectionManager, ChannelId), {stop, normal, State#state{close_sent = true, channel_state = ChannelState}} end; diff --git a/lib/ssh/src/ssh_dbg.erl b/lib/ssh/src/ssh_dbg.erl index bd6bc0335b..ce5596e0f9 100644 --- a/lib/ssh/src/ssh_dbg.erl +++ b/lib/ssh/src/ssh_dbg.erl @@ -113,7 +113,12 @@ setup_tracer(Write, MangleArg) -> ok. %%%---------------------------------------------------------------- -shrink_bin(B) when is_binary(B), size(B)>100 -> {'*** SHRINKED BIN',size(B),element(1,split_binary(B,20)),'***'}; +shrink_bin(B) when is_binary(B), size(B)>100 -> {'*** SHRINKED BIN', + size(B), + element(1,split_binary(B,20)), + '...', + element(2,split_binary(B,size(B)-20)) + }; shrink_bin(L) when is_list(L) -> lists:map(fun shrink_bin/1, L); shrink_bin(T) when is_tuple(T) -> list_to_tuple(shrink_bin(tuple_to_list(T))); shrink_bin(X) -> X. |