aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-09-06 14:29:17 +0200
committerHans Nilsson <[email protected]>2016-09-06 14:29:17 +0200
commit10ffae2b1c12f6d564dfc3fbf3e316491b71b2c3 (patch)
treea3b3ca9b76d3083c0896074de0d7ee46e8e15228
parentadf41ae9a17d8f0d0ef424eb504f41bf991532a4 (diff)
parent7fa1f7e973369dedd56f1be17d3b075d72ec0b60 (diff)
downloadotp-10ffae2b1c12f6d564dfc3fbf3e316491b71b2c3.tar.gz
otp-10ffae2b1c12f6d564dfc3fbf3e316491b71b2c3.tar.bz2
otp-10ffae2b1c12f6d564dfc3fbf3e316491b71b2c3.zip
Merge branch 'hans/ssh/channel_no_detect_close/OTP-13859' into maint
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 2eb29c9b32..00bf1a3885 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -1238,9 +1238,12 @@ handle_event(internal, prepare_next_packet, _, D) ->
handle_event(info, {CloseTag,Socket}, StateName,
D = #data{socket = Socket,
transport_close_tag = CloseTag}) ->
- disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
- description = "Connection closed"},
- StateName, D);
+ %% Simulate a disconnect from the peer
+ handle_event(info,
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
+ description = "Connection closed"},
+ StateName,
+ D);
handle_event(info, {timeout, {_, From} = Request}, _,
#data{connection_state = #connection{requests = Requests} = C0} = D) ->