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:
@@ -82,7 +82,9 @@ func (m *Monitor) Stop() {
|
||||
m.mu.Lock()
|
||||
m.cfg.LastEventID = m.events.LastEventID()
|
||||
m.mu.Unlock()
|
||||
_ = config.Save(m.cfg)
|
||||
if err := config.Save(m.cfg); err != nil {
|
||||
log.Printf("config save error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Monitor) pollLoop() {
|
||||
|
||||
Reference in New Issue
Block a user