Reset XML stream before sending SASL <success/>

This commit is contained in:
Evgeniy Khramtsov 2017-01-17 22:06:26 +03:00
parent 22ee16fd9d
commit b8db0a8ed6
1 changed files with 1 additions and 1 deletions

View File

@ -809,6 +809,7 @@ process_sasl_success(Props, ServerOut,
mod := Mod, sasl_mech := Mech} = State) ->
User = identity(Props),
AuthModule = proplists:get_value(auth_module, Props),
SockMod:reset_stream(Socket),
State1 = send_pkt(State, #sasl_success{text = ServerOut}),
case is_disconnected(State1) of
true -> State1;
@ -819,7 +820,6 @@ process_sasl_success(Props, ServerOut,
case is_disconnected(State2) of
true -> State2;
false ->
SockMod:reset_stream(Socket),
State3 = maps:remove(sasl_state,
maps:remove(sasl_mech, State2)),
State3#{stream_id => new_id(),