mirror of https://github.com/shirou/gopsutil
Don't ignore err when getting CgroupMemDocker stats
Fixes panic: runtime error: index out of range goroutine 10 [running]: testing.func·006() /usr/local/go/src/testing/testing.go:441 +0x181 github.com/shirou/gopsutil/docker.CgroupMem(0x586b30, 0x6, 0x5a87d0, 0x1c, 0x0, 0x0, 0x0) /home/jwilder/go/src/github.com/shirou/gopsutil/docker/docker_linux.go:119 +0xf48 github.com/shirou/gopsutil/docker.CgroupMemDocker(0x586b30, 0x6, 0x0, 0x0, 0x0) /home/jwilder/go/src/github.com/shirou/gopsutil/docker/docker_linux.go:184 +0x57 If the ID passed to the CGroupMemDocker does not exist, you can get a panic at runtime. This can happen when a container exits before calling the func.pull/36/head
parent
d6802457a3
commit
812b04d363
Loading…
Reference in New Issue