mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-10 15:47:30 +01:00
Resend stream header before calling handle_auth_success/2 callback
This commit is contained in:
parent
7a186e242d
commit
f3594ec881
@ -624,18 +624,18 @@ process_cert_verification(State) ->
|
|||||||
process_sasl_success(#{mod := Mod,
|
process_sasl_success(#{mod := Mod,
|
||||||
sockmod := SockMod,
|
sockmod := SockMod,
|
||||||
socket := Socket} = State) ->
|
socket := Socket} = State) ->
|
||||||
State1 = try Mod:handle_auth_success(<<"EXTERNAL">>, State)
|
SockMod:reset_stream(Socket),
|
||||||
catch _:undef -> State
|
State1 = State#{stream_id => new_id(),
|
||||||
end,
|
stream_restarted => true,
|
||||||
case is_disconnected(State1) of
|
stream_state => wait_for_stream,
|
||||||
true -> State1;
|
stream_authenticated => true},
|
||||||
|
State2 = send_header(State1),
|
||||||
|
case is_disconnected(State2) of
|
||||||
|
true -> State2;
|
||||||
false ->
|
false ->
|
||||||
SockMod:reset_stream(Socket),
|
try Mod:handle_auth_success(<<"EXTERNAL">>, State2)
|
||||||
State2 = State1#{stream_id => new_id(),
|
catch _:undef -> State2
|
||||||
stream_restarted => true,
|
end
|
||||||
stream_state => wait_for_stream,
|
|
||||||
stream_authenticated => true},
|
|
||||||
send_header(State2)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
-spec process_sasl_failure(sasl_failure(), state()) -> state().
|
-spec process_sasl_failure(sasl_failure(), state()) -> state().
|
||||||
|
Loading…
Reference in New Issue
Block a user