aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-05-04 16:58:17 +0200
committerHans Nilsson <[email protected]>2016-05-04 17:11:52 +0200
commit42265970b989ce130cf62e79574ce533cec2a4e9 (patch)
tree4fa154f33fbd2729699f8e998a595efb162e39c0 /lib/ssh
parentd9f30be07f6ebb014f6021ac2bd3a99894da4c53 (diff)
downloadotp-42265970b989ce130cf62e79574ce533cec2a4e9.tar.gz
otp-42265970b989ce130cf62e79574ce533cec2a4e9.tar.bz2
otp-42265970b989ce130cf62e79574ce533cec2a4e9.zip
ssh: correct bad stop return value tag
Diffstat (limited to 'lib/ssh')
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl20
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.