Skip to content

Commit f716793

Browse files
committed
Add NGINX App Protect instance watcher
1 parent 62c2377 commit f716793

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/watcher/instance/nginx-app-protect-instance-watcher.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (w *NginxAppProtectInstanceWatcher) Watch(ctx context.Context, instancesCha
101101
func (w *NginxAppProtectInstanceWatcher) watchDirectories(ctx context.Context) {
102102
for _, versionFile := range versionFiles {
103103
if !w.filesBeingWatcher[versionFile] {
104-
if _, fileOs := os.Stat(versionFile); fileOs != nil && !os.IsNotExist(fileOs) {
104+
if _, fileOs := os.Stat(versionFile); fileOs != nil && os.IsNotExist(fileOs) {
105105
w.filesBeingWatcher[versionFile] = false
106106
continue
107107
}
@@ -131,6 +131,8 @@ func (w *NginxAppProtectInstanceWatcher) addWatcher(ctx context.Context, version
131131
)
132132
}
133133
}
134+
135+
slog.DebugContext(ctx, "Added NGINX App Protect file watcher", "file", versionFile)
134136
}
135137

136138
func (w *NginxAppProtectInstanceWatcher) readVersionFile(ctx context.Context, versionFile string) {

0 commit comments

Comments
 (0)