mirror of
https://github.com/docker/compose.git
synced 2025-07-14 09:14:26 +02:00
using as flag of the up command, watch was blocking process shutdown
This happened when sunsetting the application from docker compose down command Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
de478f84b0
commit
e1fd7a6567
@ -183,15 +183,13 @@ func (s *composeService) watch(ctx context.Context, syncChannel chan bool, proje
|
|||||||
}
|
}
|
||||||
options.LogTo.Log(api.WatchLogger, "Watch enabled")
|
options.LogTo.Log(api.WatchLogger, "Watch enabled")
|
||||||
|
|
||||||
err = eg.Wait()
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return err
|
return eg.Wait()
|
||||||
case <-syncChannel:
|
case <-syncChannel:
|
||||||
options.LogTo.Log(api.WatchLogger, "Watch disabled")
|
options.LogTo.Log(api.WatchLogger, "Watch disabled")
|
||||||
ctx.Done()
|
return nil
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user