diff --git a/llama-swap.go b/llama-swap.go index 28914fbb..62b1eaf3 100644 --- a/llama-swap.go +++ b/llama-swap.go @@ -144,8 +144,8 @@ func watchConfigFileWithReload(configPath string, reloadChan chan<- *proxy.Proxy if !ok { return } - // We only care about writes to the specific config file - if event.Name == configPath && event.Has(fsnotify.Write) { + // We only care about writes/creates to the specific config file + if event.Name == configPath && (event.Has(fsnotify.Write) || event.Has(fsnotify.Create)) { // Reset or start the debounce timer if debounceTimer != nil { debounceTimer.Stop()