Skip to content

Commit

Permalink
Merge pull request #27 from satoren/reconnect_when_disconnect_by_netw…
Browse files Browse the repository at this point in the history
…ork_problem

auto reconnect when disconnected by some reason
  • Loading branch information
kyleaa authored Mar 5, 2022
2 parents 2b7b26a + 4c65528 commit 3f1025e
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 3f1025e

Please sign in to comment.