This commit is contained in:
Ery Lee 2015-04-12 21:04:17 +08:00
parent e5099d89eb
commit 4fb90d1e19
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ cluster([SNode]) ->
pong ->
application:stop(emqttd),
application:stop(esockd),
emqtt_mnesia:cluster(Node),
emqttd_mnesia:cluster(Node),
application:start(esockd),
application:start(emqttd),
?PRINT("cluster with ~p successfully.~n", [Node]);

View File

@ -153,13 +153,13 @@ wait_for_tables() ->
%% Simple cluster with another nodes.
%%
%% @end
%%------------------------------------------------------------------------------
%%--------------
cluster(Node) ->
%% stop mnesia
mnesia:stop(),
ok = wait_for_mnesia(stop),
%% delete mnesia
ok = mnesia:delete_schema(node()),
ok = mnesia:delete_schema([node()]),
%% start mnesia
ok = mnesia:start(),
%% connect with extra_db_nodes