cri: check fsnotify watcher when receiving cni conf dir events
carry: 612f5f9f44
Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
134f7a7370
commit
591caece0c
@ -73,7 +73,11 @@ func newCNINetConfSyncer(confDir string, netPlugin cni.CNI, loadOpts []cni.CNIOp
|
||||
func (syncer *cniNetConfSyncer) syncLoop() error {
|
||||
for {
|
||||
select {
|
||||
case event := <-syncer.watcher.Events:
|
||||
case event, ok := <-syncer.watcher.Events:
|
||||
if !ok {
|
||||
logrus.Debugf("cni watcher channel is closed")
|
||||
return nil
|
||||
}
|
||||
// Only reload config when receiving write/rename/remove
|
||||
// events
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user