mirror of
https://github.com/docker/compose.git
synced 2026-08-31 14:52:42 +00:00
Write error to watcher error channel if Start() fails
Up's loop will notice globalCtx is done, and invoke watcher.Stop(). Stop() reads from the watcher error channel. If Start() does not write an error, Stop() will never finish. Fixes https://github.com/docker/compose/issues/13262 Signed-off-by: Benedikt Radtke <benediktradtke@gmail.com>
This commit is contained in:
parent
d9423f6872
commit
fa7e85ed83
1 changed files with 3 additions and 0 deletions
|
|
@ -89,6 +89,9 @@ func (w *Watcher) Start(ctx context.Context) error {
|
|||
w.stopFn = cancelFunc
|
||||
wait, err := w.watchFn(ctx, w.project, w.options)
|
||||
if err != nil {
|
||||
go func() {
|
||||
w.errCh <- err
|
||||
}()
|
||||
return err
|
||||
}
|
||||
go func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue