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 pippolo84 committed Aug 28, 2023
1 parent 41d17e6 commit dcadad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/datapath/linux/ipsec/ipsec_linux.go
Original file line number Diff line number Diff line change
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 dcadad8

Please sign in to comment.