Skip to content

Commit db55351

Browse files
committed
fix: Don't try to cluster with ephemeral nodes that haven't been cleaned up
1 parent 30aaecd commit db55351

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎lib/cluster/strategy/tailscale.ex‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ defmodule Cluster.Strategy.Tailscale do
6060
tag = Keyword.fetch!(config, :tag)
6161
appname = Keyword.fetch!(config, :appname)
6262

63-
Octocon.Utils.Tailscale.list_devices()
64-
|> Enum.filter(&(("tag:" <> tag) in (&1["tags"] || [])))
63+
Octocon.Utils.Tailscale.list_devices() |> Enum.filter(fn device -> (("tag:" <> tag) in (device["tags"] || [])) && device["connectedToControl"] == true end)
6564
|> Enum.map(&List.first(&1["addresses"]))
6665
|> Enum.map(&"#{appname}@#{&1}")
6766
|> Enum.map(&String.to_atom/1)

0 commit comments

Comments
 (0)