aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-10-31 10:06:53 +0100
committerHans Nilsson <[email protected]>2016-10-31 10:06:53 +0100
commit3ec1b3666c14acdc585da6453101b61cb4c69270 (patch)
treeca4a04953403153960c4545b4f186d8e484addb3 /lib/ssh/src
parent07bce649026307c15a05e03c39dc5c1601d28603 (diff)
parent11ff9b33aac196798b33849cab5c1bf4efb01755 (diff)
downloadotp-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.erl2
-rw-r--r--lib/ssh/src/ssh_dbg.erl7
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.