mirror of
https://github.com/docker/compose.git
synced 2026-10-12 02:13:08 +00:00
The code used an atomic bool to guard channel writes. However, this failed to synchronize with the call to close(), causing a panic. Fix the race condition by using a mutex to guard the update to the bool `stopped` and subsequent channel writes. This ensures atomic execution of both updates to `stopped` and channel writes, preventing races between writes and close(). Signed-off-by: horus <[email protected]>