Skip to content

Commit

Permalink
make fsnotify event more readable
Browse files Browse the repository at this point in the history
Signed-off-by: yulng <wei.yang@daocloud.io>
  • Loading branch information
yulng committed Jan 7, 2023
1 parent 80af06e commit aac65db
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 @@ -668,7 +668,7 @@ func keyfileWatcher(ctx context.Context, watcher *fswatcher.Watcher, keyfilePath
for {
select {
case event := <-watcher.Events:
if event.Op&(fsnotify.Create|fsnotify.Write) == 0 {
if !event.Op.Has(fsnotify.Create) || !event.Op.Has(fsnotify.Write) {
continue
}

Expand Down

0 comments on commit aac65db

Please sign in to comment.