mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-25 08:07:46 +00:00
Add isEphemeral() method to Machine
This commit is contained in:
3
app.go
3
app.go
@@ -257,8 +257,7 @@ func (h *Headscale) expireEphemeralNodesWorker() {
|
||||
|
||||
expiredFound := false
|
||||
for _, machine := range machines {
|
||||
if machine.AuthKey != nil && machine.LastSeen != nil &&
|
||||
machine.AuthKey.Ephemeral &&
|
||||
if machine.isEphemeral() && machine.LastSeen != nil &&
|
||||
time.Now().
|
||||
After(machine.LastSeen.Add(h.cfg.EphemeralNodeInactivityTimeout)) {
|
||||
expiredFound = true
|
||||
|
Reference in New Issue
Block a user