mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
In cases where there is high latency (ie, not-local network) `waitExitOrRemoved` was not receiving events for short-lived containers. This caused the client to hang while waiting for a notification that the container has stopped. This happens because `client.Events()` returns immediately and spins a goroutine up to process events. The problem here is it returns before the request to the events endpoint is even made. Even without high-latency issues, there is no guarantee that the goroutine is even scheduled by the time the function returns. Signed-off-by: Brian Goff <cpuguy83@gmail.com> Upstream-commit: 47585996bf72bcfde9ef058522059bef352e83e0 Component: engine