mirror of
https://github.com/processone/ejabberd.git
synced 2024-07-06 23:22:36 +02:00
Make chat room destroy and create being sync_dirty to limit mnesia overload. (thanks to Mickael Remond)
This commit is contained in:
parent
cc1839a250
commit
d0b7cd599b
|
@ -306,7 +306,7 @@ handle_info({room_destroyed, RoomHost, Pid}, State) ->
|
||||||
mnesia:delete_object(#muc_online_room{name_host = RoomHost,
|
mnesia:delete_object(#muc_online_room{name_host = RoomHost,
|
||||||
pid = Pid})
|
pid = Pid})
|
||||||
end,
|
end,
|
||||||
mnesia:async_dirty(F),
|
mnesia:sync_dirty(F),
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
handle_info(_Info, State) ->
|
handle_info(_Info, State) ->
|
||||||
{noreply, State}.
|
{noreply, State}.
|
||||||
|
@ -603,7 +603,7 @@ register_room(Host, Room, Pid) ->
|
||||||
mnesia:write(#muc_online_room{name_host = {Room, Host},
|
mnesia:write(#muc_online_room{name_host = {Room, Host},
|
||||||
pid = Pid})
|
pid = Pid})
|
||||||
end,
|
end,
|
||||||
mnesia:async_dirty(F).
|
mnesia:sync_dirty(F).
|
||||||
|
|
||||||
iq_disco_info(Lang) ->
|
iq_disco_info(Lang) ->
|
||||||
[{xmlelement, "identity",
|
[{xmlelement, "identity",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user