]> granicus.if.org Git - ejabberd/commitdiff
Fix race introduced by ffdaff374 on ejabberd_mnesia init
authorChristophe Romain <christophe.romain@process-one.net>
Thu, 28 Sep 2017 13:14:11 +0000 (15:14 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Thu, 28 Sep 2017 13:14:11 +0000 (15:14 +0200)
src/ejabberd_mnesia.erl

index 16e38501161349ea203fcfa78783491bef6f8989..34691545ae5a7713aa8b4a62f9278c53fd17e28a 100644 (file)
@@ -68,6 +68,8 @@ init([]) ->
                _ -> ok
            end,
            ejabberd:start_app(mnesia, permanent),
+           ?DEBUG("Waiting for Mnesia tables synchronization...", []),
+           mnesia:wait_for_tables(mnesia:system_info(local_tables), infinity),
            Schema = read_schema_file(),
            {ok, #state{schema = Schema}};
        false ->