fix cluster
This commit is contained in:
parent
60b42661b1
commit
dbad1cf920
|
@ -1,5 +1,5 @@
|
|||
## Name of the node
|
||||
-name emqtt@127.0.0.1
|
||||
-sname emqtt
|
||||
|
||||
## Cookie for distributed erlang
|
||||
-setcookie emqtt
|
||||
|
|
|
@ -22,8 +22,9 @@ cluster_info([]) ->
|
|||
Nodes = [node()|nodes()],
|
||||
?PRINT("cluster nodes: ~p~n", [Nodes]).
|
||||
|
||||
cluster([Node]) ->
|
||||
case net_adm:ping(list_to_atom(Node)) of
|
||||
cluster([SNode]) ->
|
||||
Node = list_to_atom(SNode),
|
||||
case net_adm:ping(Node) of
|
||||
pong ->
|
||||
application:stop(emqtt),
|
||||
mnesia:stop(),
|
||||
|
|
Loading…
Reference in New Issue