25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

Make chat room destroy and create being sync_dirty to limit mnesia overload. (thanks to Mickael Remond)

This commit is contained in:
Christophe Romain 2010-07-13 21:48:36 +02:00
parent cc1839a250
commit d0b7cd599b

View File

@ -306,7 +306,7 @@ handle_info({room_destroyed, RoomHost, Pid}, State) ->
mnesia:delete_object(#muc_online_room{name_host = RoomHost,
pid = Pid})
end,
mnesia:async_dirty(F),
mnesia:sync_dirty(F),
{noreply, State};
handle_info(_Info, State) ->
{noreply, State}.
@ -603,7 +603,7 @@ register_room(Host, Room, Pid) ->
mnesia:write(#muc_online_room{name_host = {Room, Host},
pid = Pid})
end,
mnesia:async_dirty(F).
mnesia:sync_dirty(F).
iq_disco_info(Lang) ->
[{xmlelement, "identity",