diff options
author | Hans Nilsson <[email protected]> | 2016-09-01 18:20:22 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-09-01 18:21:18 +0200 |
commit | 7fa1f7e973369dedd56f1be17d3b075d72ec0b60 (patch) | |
tree | d3d83f2f12b2069f299963f5a99990973879a57d /lib | |
parent | 068185ef518384c0141cc643820f3a2a103ff4c3 (diff) | |
download | otp-7fa1f7e973369dedd56f1be17d3b075d72ec0b60.tar.gz otp-7fa1f7e973369dedd56f1be17d3b075d72ec0b60.tar.bz2 otp-7fa1f7e973369dedd56f1be17d3b075d72ec0b60.zip |
ssh: fix no detect of tcp close
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 9 |
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) -> |