Add isEphemeral() method to Machine
This commit is contained in:
parent
6db9656008
commit
4de49f5f49
2 changed files with 7 additions and 2 deletions
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue