1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 09:49:18 +02:00

Report db failures in mod_muc_mnesia:restore_room

This commit is contained in:
Pawel Chmielowski 2025-07-23 20:20:51 +02:00
parent 6214e0385d
commit 1a9b147baf
2 changed files with 4 additions and 2 deletions

View file

@ -76,9 +76,11 @@ store_room(_LServer, Host, Name, Opts, _) ->
mnesia:transaction(F). mnesia:transaction(F).
restore_room(_LServer, Host, Name) -> restore_room(_LServer, Host, Name) ->
case catch mnesia:dirty_read(muc_room, {Name, Host}) of try mnesia:dirty_read(muc_room, {Name, Host}) of
[#muc_room{opts = Opts}] -> Opts; [#muc_room{opts = Opts}] -> Opts;
_ -> error _ -> error
catch
_:_ -> {error, db_failure}
end. end.
forget_room(_LServer, Host, Name) -> forget_room(_LServer, Host, Name) ->