File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -660,20 +660,19 @@ func (c *Manager) waitForEvents(ec chan<- Event, errCh chan<- error) {
660
660
}
661
661
if bytesRead >= syscall .SizeofInotifyEvent {
662
662
out := make (map [string ]interface {})
663
- if err := readKVStatsFile (c .path , "memory.events" , out ); err == nil {
664
- e , err := parseMemoryEvents (out )
665
- if err != nil {
666
- errCh <- err
667
- return
668
- }
669
- ec <- e
670
- } else {
663
+ if err := readKVStatsFile (c .path , "memory.events" , out ); err != nil {
671
664
// When cgroup is deleted read may return -ENODEV instead of -ENOENT from open.
672
665
if _ , statErr := os .Lstat (filepath .Join (c .path , "memory.events" )); ! os .IsNotExist (statErr ) {
673
666
errCh <- err
674
667
}
675
668
return
676
669
}
670
+ e , err := parseMemoryEvents (out )
671
+ if err != nil {
672
+ errCh <- err
673
+ return
674
+ }
675
+ ec <- e
677
676
if c .isCgroupEmpty () {
678
677
return
679
678
}
You can’t perform that action at this time.
0 commit comments