Skip to content

Commit

Permalink
auto reconnect when disconnected by some reason
Browse files Browse the repository at this point in the history
  • Loading branch information
satoren committed Mar 2, 2022
1 parent aa035c5 commit 4c65528
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/strategy/tags.ex
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ defmodule ClusterEC2.Strategy.Tags do
defp load(%State{topology: topology, connect: connect, disconnect: disconnect, list_nodes: list_nodes} = state) do
case get_nodes(state) do
{:ok, new_nodelist} ->
added = MapSet.difference(new_nodelist, state.meta)
removed = MapSet.difference(state.meta, new_nodelist)

new_nodelist =
Expand All @@ -101,7 +100,7 @@ defmodule ClusterEC2.Strategy.Tags do
end

new_nodelist =
case Cluster.Strategy.connect_nodes(topology, connect, list_nodes, MapSet.to_list(added)) do
case Cluster.Strategy.connect_nodes(topology, connect, list_nodes, MapSet.to_list(new_nodelist)) do
:ok ->
new_nodelist

Expand Down

0 comments on commit 4c65528

Please sign in to comment.