Fix SIGSEGV crash related to map of state changes

See https://github.com/juanfont/headscale/issues/1114#issuecomment-1373698441
This commit is contained in:
Even Holthe 2023-01-10 21:43:35 +01:00 committed by Juan Font
parent 93aca81c1c
commit 26282b7a54

1
app.go
View File

@ -162,6 +162,7 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {
aclRules: tailcfg.FilterAllowAll, // default allowall
registrationCache: registrationCache,
pollNetMapStreamWG: sync.WaitGroup{},
lastStateChange: xsync.NewMapOf[time.Time](),
}
err = app.initDB()