Guillaume Tardif
|
40334d570a
|
Avoid nil pointer when reading logs of a just terminated container.
Hit this when following logs of a container restarted with a health check:
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x168771e]
goroutine 1 [running]:
github.com/docker/compose-cli/aci.getACIContainerLogs(0x2d85260, 0xc000526c60, 0xc0001465a0, 0x24, 0xc0004f4da0, 0xa, 0xc0004f4db0, 0x7, 0x7ffeefbffab2, 0xb, ...)
github.com/docker/compose-cli/aci/aci.go:285 +0x1fe
github.com/docker/compose-cli/aci.streamLogs(0x2d85260, 0xc000526c60, 0xc0001465a0, 0x24, 0xc0004f4da0, 0xa, 0xc0004f4db0, 0x7, 0x7ffeefbffab2, 0xb, ...)
github.com/docker/compose-cli/aci/aci.go:297 +0x2e5
```
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
|
2020-11-09 18:19:31 +01:00 |