mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Close sessions that were half connected (thanks to Alexey Shchepin)(EJAB-1165)
SVN Revision: 2911
This commit is contained in:
parent
8068fdf4e3
commit
16bd626fc9
@ -825,14 +825,6 @@ wait_for_session({xmlstreamelement, El}, StateData) ->
|
|||||||
?INFO_MSG("(~w) Opened session for ~s",
|
?INFO_MSG("(~w) Opened session for ~s",
|
||||||
[StateData#state.socket,
|
[StateData#state.socket,
|
||||||
jlib:jid_to_string(JID)]),
|
jlib:jid_to_string(JID)]),
|
||||||
%%send_element(StateData, {xmlelement, "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, U, StateData#state.server, R, Info),
|
|
||||||
Res = jlib:make_result_iq_reply(El),
|
Res = jlib:make_result_iq_reply(El),
|
||||||
send_element(StateData, Res),
|
send_element(StateData, Res),
|
||||||
change_shaper(StateData, JID),
|
change_shaper(StateData, JID),
|
||||||
@ -849,6 +841,12 @@ wait_for_session({xmlstreamelement, El}, StateData) ->
|
|||||||
privacy_get_user_list, StateData#state.server,
|
privacy_get_user_list, StateData#state.server,
|
||||||
#userlist{},
|
#userlist{},
|
||||||
[U, StateData#state.server]),
|
[U, 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, U, StateData#state.server, R, Info),
|
||||||
NewStateData =
|
NewStateData =
|
||||||
StateData#state{
|
StateData#state{
|
||||||
sid = SID,
|
sid = SID,
|
||||||
|
Loading…
Reference in New Issue
Block a user