Don't call ejabberd_cluster from its submodules
authorEvgeny Khramtsov <ekhramtsov@process-one.net>
Wed, 31 Jul 2019 16:25:22 +0000 (19:25 +0300)
committerEvgeny Khramtsov <ekhramtsov@process-one.net>
Wed, 31 Jul 2019 16:25:47 +0000 (19:25 +0300)
Fixes #2971

src/ejabberd_cluster_mnesia.erl

index fb793cda8176ee414732eafbb2f3d1f9ed0b0b67..60539330ce7e18633e04a14cef66010b53b39b74 100644 (file)
@@ -136,7 +136,7 @@ replicate_database(Node) ->
     mnesia:change_table_copy_type(schema, node(), disc_copies),
     lists:foreach(
         fun(Table) ->
-            Type = ejabberd_cluster:call(Node, mnesia, table_info, [Table, storage_type]),
+            Type = rpc:call(Node, mnesia, table_info, [Table, storage_type]),
             mnesia:add_table_copy(Table, node(), Type)
         end, mnesia:system_info(tables)--[schema]).