Skip to content

Commit

Permalink
config watch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
damongolding committed Oct 17, 2024
1 parent ac68da8 commit 4a0ab9b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,15 @@ func (c *Config) reloadConfig(reason string) {
c.mu.Lock()
defer c.mu.Unlock()

if err := c.Load(); err != nil {
log.Error("Failed to reload config:", err)
newConfig := New()

if err := newConfig.Load(); err != nil {
log.Error("Reloading config:", err)
return
}

*c = *newConfig

c.updateConfigState()
}

Expand Down

0 comments on commit 4a0ab9b

Please sign in to comment.