File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -796,7 +796,7 @@ func (c *Manager) memoryEventNonBlockFD() (_ *os.File, retErr error) {
796796}
797797
798798func (c * Manager ) EventChan () (<- chan Event , <- chan error ) {
799- ec := make (chan Event , 1 )
799+ ec := make (chan Event , 16 )
800800 errCh := make (chan error , 1 )
801801
802802 fd , err := c .memoryEventNonBlockFD ()
@@ -821,12 +821,6 @@ func (c *Manager) EventChan() (<-chan Event, <-chan error) {
821821 continue
822822 }
823823
824- // Check cgroup.events first
825- shouldExit := false
826- if c .isCgroupEmpty () {
827- shouldExit = true
828- }
829-
830824 out := make (map [string ]uint64 )
831825 if err := readKVStatsFile (c .path , "memory.events" , out ); err != nil {
832826 // When cgroup is deleted read may return -ENODEV instead of -ENOENT from open.
@@ -844,7 +838,7 @@ func (c *Manager) EventChan() (<-chan Event, <-chan error) {
844838 OOMKill : out ["oom_kill" ],
845839 }
846840
847- if shouldExit {
841+ if c . isCgroupEmpty () {
848842 return
849843 }
850844 }
You can’t perform that action at this time.
0 commit comments