25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Close sessions that were half connected (thanks to Alexey Shchepin)(EJAB-1165)

SVN Revision: 2912
This commit is contained in:
Badlop 2010-01-17 19:29:35 +00:00
parent f3483529a7
commit 0495112aab

View File

@ -772,12 +772,6 @@ wait_for_session({xmlstreamelement, El}, StateData) ->
[StateData#state.socket,
exmpp_jid:to_binary(JID)]),
%%send_element(StateData, exmpp_stream:features([])),
SID = {now(), self()},
Conn = get_conn_type(StateData),
Info = [{ip, StateData#state.ip}, {conn, Conn},
{auth_module, StateData#state.auth_module}],
ejabberd_sm:open_session(
SID, JID, Info),
Res = exmpp_server_session:establish(El),
send_element(StateData, Res),
change_shaper(StateData, JID),
@ -794,6 +788,12 @@ wait_for_session({xmlstreamelement, El}, StateData) ->
privacy_get_user_list, StateData#state.server,
#userlist{},
[StateData#state.user, StateData#state.server]),
SID = {now(), self()},
Conn = get_conn_type(StateData),
Info = [{ip, StateData#state.ip}, {conn, Conn},
{auth_module, StateData#state.auth_module}],
ejabberd_sm:open_session(
SID, JID, Info),
fsm_next_state(session_established,
StateData#state{
sasl_state = 'undefined',