mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
improved s2s connections clean up (EJAB-1202)
This commit is contained in:
parent
64f8cf8a9e
commit
c8c7169465
@ -910,21 +910,28 @@ send_db_request(StateData) ->
|
|||||||
Key ->
|
Key ->
|
||||||
Key
|
Key
|
||||||
end,
|
end,
|
||||||
case New of
|
NewStateData = StateData#state{new = New},
|
||||||
false ->
|
try
|
||||||
ok;
|
case New of
|
||||||
Key1 ->
|
false ->
|
||||||
send_element(StateData, exmpp_dialback:key(
|
ok;
|
||||||
StateData#state.myname, Server, Key1))
|
Key1 ->
|
||||||
end,
|
send_element(StateData, exmpp_dialback:key(
|
||||||
case StateData#state.verify of
|
StateData#state.myname, Server, Key1))
|
||||||
false ->
|
end,
|
||||||
ok;
|
case StateData#state.verify of
|
||||||
{_Pid, Key2, SID} ->
|
false ->
|
||||||
send_element(StateData, exmpp_dialback:verify_request(
|
ok;
|
||||||
StateData#state.myname, StateData#state.server, SID, Key2))
|
{_Pid, Key2, SID} ->
|
||||||
end,
|
send_element(StateData, exmpp_dialback:verify_request(
|
||||||
{next_state, wait_for_validation, StateData#state{new = New}, ?FSMTIMEOUT*6}.
|
StateData#state.myname,
|
||||||
|
StateData#state.server, SID, Key2))
|
||||||
|
end,
|
||||||
|
{next_state, wait_for_validation, NewStateData, ?FSMTIMEOUT*6}
|
||||||
|
catch
|
||||||
|
_:_ ->
|
||||||
|
{stop, normal, NewStateData}
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
is_verify_res(#xmlel{ns = ?NS_DIALBACK, name = 'result',
|
is_verify_res(#xmlel{ns = ?NS_DIALBACK, name = 'result',
|
||||||
|
Loading…
Reference in New Issue
Block a user