From b8db0a8ed6f4f664777c00b1745ae18727aa4a93 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Tue, 17 Jan 2017 22:06:26 +0300 Subject: [PATCH] Reset XML stream before sending SASL --- src/xmpp_stream_in.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(),