mirror of
https://github.com/juanfont/headscale.git
synced 2025-12-15 16:31:49 +00:00
Compare commits
3 Commits
ts2021-imp
...
fix-spurio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d98493360 | ||
|
|
03659c4175 | ||
|
|
843e2bd9b6 |
@@ -7,6 +7,7 @@
|
||||
- Headscale fails to serve if the ACL policy file cannot be parsed [#537](https://github.com/juanfont/headscale/pull/537)
|
||||
- Fix labels cardinality error when registering unknown pre-auth key [#519](https://github.com/juanfont/headscale/pull/519)
|
||||
- Fix send on closed channel crash in polling [#542](https://github.com/juanfont/headscale/pull/542)
|
||||
- Fixed spurious calls to setLastStateChangeToNow from ephemeral nodes [#566](https://github.com/juanfont/headscale/pull/566)
|
||||
|
||||
## 0.15.0 (2022-03-20)
|
||||
|
||||
|
||||
6
app.go
6
app.go
@@ -292,11 +292,13 @@ func (h *Headscale) expireEphemeralNodesWorker() {
|
||||
return
|
||||
}
|
||||
|
||||
expiredFound := false
|
||||
for _, machine := range machines {
|
||||
if machine.AuthKey != nil && machine.LastSeen != nil &&
|
||||
machine.AuthKey.Ephemeral &&
|
||||
time.Now().
|
||||
After(machine.LastSeen.Add(h.cfg.EphemeralNodeInactivityTimeout)) {
|
||||
expiredFound = true
|
||||
log.Info().
|
||||
Str("machine", machine.Name).
|
||||
Msg("Ephemeral client removed from database")
|
||||
@@ -311,7 +313,9 @@ func (h *Headscale) expireEphemeralNodesWorker() {
|
||||
}
|
||||
}
|
||||
|
||||
h.setLastStateChangeToNow(namespace.Name)
|
||||
if expiredFound {
|
||||
h.setLastStateChangeToNow(namespace.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,11 +47,11 @@ func TestIntegrationTestSuite(t *testing.T) {
|
||||
|
||||
s.namespaces = map[string]TestNamespace{
|
||||
"thisspace": {
|
||||
count: 15,
|
||||
count: 10,
|
||||
tailscales: make(map[string]dockertest.Resource),
|
||||
},
|
||||
"otherspace": {
|
||||
count: 5,
|
||||
count: 3,
|
||||
tailscales: make(map[string]dockertest.Resource),
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user