25
1
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:
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) -> 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 ->