Skip to content

Commit

Permalink
Revert "make fsnotify event more readable"
Browse files Browse the repository at this point in the history
[ upstream commit d86c148 ]

This reverts commit 479fb7d.

The code changes are not equivalent. For example,
event.Op=fsnotify.Create has different results.

Fixes: #22903

Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
  • Loading branch information
jschwinger233 authored and aditighag committed Sep 1, 2023
1 parent 276c9c4 commit e7494f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/datapath/linux/ipsec/ipsec_linux.go
Expand Up @@ -917,7 +917,7 @@ func keyfileWatcher(ctx context.Context, watcher *fswatcher.Watcher, keyfilePath
for {
select {
case event := <-watcher.Events:
if !event.Op.Has(fsnotify.Create) || !event.Op.Has(fsnotify.Write) {
if event.Op&(fsnotify.Create|fsnotify.Write) == 0 {
continue
}

Expand Down

0 comments on commit e7494f4

Please sign in to comment.