25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +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:
Christopher tofu Zorn 2010-05-05 16:23:06 -04:00 committed by Badlop
parent 7fc1207661
commit 516d369174

View File

@ -523,10 +523,7 @@ handle_info(_, StateName, StateData) ->
%%----------------------------------------------------------------------
terminate(_Reason, _StateName, StateData) ->
?DEBUG("terminate: Deleting session ~s", [StateData#state.id]),
mnesia:transaction(
fun() ->
mnesia:delete({http_bind, StateData#state.id})
end),
mnesia:dirty_delete({http_bind, StateData#state.id}),
send_receiver_reply(StateData#state.http_receiver, {ok, terminate}),
case StateData#state.waiting_input of
false ->