mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-29 05:18:48 -05:00
Remove superfluous test support code. Fix bug in node list cli command.
Add tests.
This commit is contained in:
5
app.go
5
app.go
@@ -100,11 +100,6 @@ func (h *Headscale) redirect(w http.ResponseWriter, req *http.Request) {
|
||||
// ExpireEphemeralNodes deletes ephemeral machine records that have not been
|
||||
// seen for longer than h.cfg.EphemeralNodeInactivityTimeout
|
||||
func (h *Headscale) ExpireEphemeralNodes(milliSeconds int64) {
|
||||
if milliSeconds == 0 {
|
||||
// For testing
|
||||
h.expireEphemeralNodesWorker()
|
||||
return
|
||||
}
|
||||
ticker := time.NewTicker(time.Duration(milliSeconds) * time.Millisecond)
|
||||
for range ticker.C {
|
||||
h.expireEphemeralNodesWorker()
|
||||
|
||||
Reference in New Issue
Block a user