refactor: improve error handling, validation and proper cleanup

This commit is contained in:
yusing
2026-01-25 19:18:14 +08:00
parent 9f245a62f2
commit 5c341d4745
12 changed files with 52 additions and 30 deletions

View File

@@ -106,7 +106,7 @@ func (c *Config) Validate() gperr.Error {
c.allowLocal = true
}
if c.Notify.Interval < 0 {
if c.Notify.Interval <= 0 {
c.Notify.Interval = defaultNotifyInterval
}