mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
Use dirty_delete when removing the session.
There is no need for a transaction and has less overhead
This commit is contained in:
parent
7fc1207661
commit
516d369174
@ -523,10 +523,7 @@ handle_info(_, StateName, StateData) ->
|
|||||||
%%----------------------------------------------------------------------
|
%%----------------------------------------------------------------------
|
||||||
terminate(_Reason, _StateName, StateData) ->
|
terminate(_Reason, _StateName, StateData) ->
|
||||||
?DEBUG("terminate: Deleting session ~s", [StateData#state.id]),
|
?DEBUG("terminate: Deleting session ~s", [StateData#state.id]),
|
||||||
mnesia:transaction(
|
mnesia:dirty_delete({http_bind, StateData#state.id}),
|
||||||
fun() ->
|
|
||||||
mnesia:delete({http_bind, StateData#state.id})
|
|
||||||
end),
|
|
||||||
send_receiver_reply(StateData#state.http_receiver, {ok, terminate}),
|
send_receiver_reply(StateData#state.http_receiver, {ok, terminate}),
|
||||||
case StateData#state.waiting_input of
|
case StateData#state.waiting_input of
|
||||||
false ->
|
false ->
|
||||||
|
Loading…
Reference in New Issue
Block a user