diff options
author | Hans Nilsson <[email protected]> | 2016-05-09 10:32:05 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-05-09 10:32:05 +0200 |
commit | 5c86b4f9fa77354ee20a67cd5f63c1abd4af1afb (patch) | |
tree | cf9525bec20df292b8560b355fbbc3e1869bc130 /lib | |
parent | 67d4141ae1b58e9a63f5eb84f3f01883bd495b64 (diff) | |
parent | 42265970b989ce130cf62e79574ce533cec2a4e9 (diff) | |
download | otp-5c86b4f9fa77354ee20a67cd5f63c1abd4af1afb.tar.gz otp-5c86b4f9fa77354ee20a67cd5f63c1abd4af1afb.tar.bz2 otp-5c86b4f9fa77354ee20a67cd5f63c1abd4af1afb.zip |
Merge branch 'hans/ssh/cuddle_tests'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index 0327a72c12..946adcf384 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -1520,7 +1520,7 @@ handle_connection_msg(Msg, StateName, State0 = event_queue = Qev0}) -> Renegotiation = renegotiation(StateName), Role = role(StateName), - try ssh_connection:handle_msg(Msg, Connection0, Role) of + try ssh_connection:handle_msg(Msg, Connection0, Role) of {{replies, Replies}, Connection} -> case StateName of {connected,_} -> @@ -1539,14 +1539,14 @@ handle_connection_msg(Msg, StateName, State0 = {keep_state, State0#data{connection_state = Connection}}; {disconnect, Reason0, {{replies, Replies}, Connection}} -> - {Repls,State} = send_replies(Replies, State0#data{connection_state = Connection}), - case {Reason0,Role} of - {{_, Reason}, client} when ((StateName =/= {connected,client}) and (not Renegotiation)) -> - User ! {self(), not_connected, Reason}; - _ -> - ok - end, - {stop, {shutdown,normal}, Repls, State#data{connection_state = Connection}} + {Repls,State} = send_replies(Replies, State0#data{connection_state = Connection}), + case {Reason0,Role} of + {{_, Reason}, client} when ((StateName =/= {connected,client}) and (not Renegotiation)) -> + User ! {self(), not_connected, Reason}; + _ -> + ok + end, + {stop_and_reply, {shutdown,normal}, Repls, State#data{connection_state = Connection}} catch _:Error -> @@ -1556,7 +1556,7 @@ handle_connection_msg(Msg, StateName, State0 = description = "Internal error"}, Connection0, Role), {Repls,State} = send_replies(Replies, State0#data{connection_state = Connection}), - {stop, {shutdown,Error}, Repls, State#data{connection_state = Connection}} + {stop_and_reply, {shutdown,Error}, Repls, State#data{connection_state = Connection}} end. |