mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Make chat room destroy and create being sync_dirty to limit mnesia overload. (thanks to Mickael Remond)
This commit is contained in:
parent
02b7ba50fe
commit
81d364a97a
@ -308,7 +308,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}.
|
||||||
@ -585,7 +585,7 @@ register_room(Host, Room, Pid) when is_binary(Host), is_binary(Room) ->
|
|||||||
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) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user