v0.3.0: fix HTTP client leak, add tests and CI pipeline
Reuse a single long-poll HTTP client instead of creating one per Events() call (~every 30s). Make TLS skip-verify configurable via syncthing_insecure_tls. Log previously swallowed config errors. Add unit tests for all monitor trackers, config, and state logic. Add CI workflow (vet, golangci-lint, govulncheck, go test -race). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -208,7 +208,9 @@ func (a *App) toggleSetting(field *bool, item *systray.MenuItem) {
|
||||
} else {
|
||||
item.Uncheck()
|
||||
}
|
||||
_ = config.Save(cfg)
|
||||
if err := config.Save(cfg); err != nil {
|
||||
log.Printf("config save error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (a *App) rediscoverAPIKey() {
|
||||
@@ -227,6 +229,8 @@ func (a *App) rediscoverAPIKey() {
|
||||
a.mu.Unlock()
|
||||
|
||||
a.client.SetAPIKey(key)
|
||||
_ = config.Save(a.cfg)
|
||||
if err := config.Save(a.cfg); err != nil {
|
||||
log.Printf("config save error: %v", err)
|
||||
}
|
||||
log.Printf("re-discovered API key")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user