From: Evgeniy Khramtsov Date: Tue, 17 Jan 2017 19:06:26 +0000 (+0300) Subject: Reset XML stream before sending SASL X-Git-Tag: 17.03-beta~91^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8db0a8ed6f4f664777c00b1745ae18727aa4a93;p=ejabberd Reset XML stream before sending SASL --- diff --git a/src/xmpp_stream_in.erl b/src/xmpp_stream_in.erl index b29848e7b..b84a971f7 100644 --- a/src/xmpp_stream_in.erl +++ b/src/xmpp_stream_in.erl @@ -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(),