From 10606abf892c32328b0affa8d1ad4a40266474e6 Mon Sep 17 00:00:00 2001 From: srevn <70211900+srevn@users.noreply.github.com> Date: Thu, 26 Jun 2025 19:20:50 +0300 Subject: [PATCH] fix config hot-reload on macos (#180) Co-authored-by: srevn --- llama-swap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llama-swap.go b/llama-swap.go index 28914fb..62b1eaf 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()