Skip to content

Commit

Permalink
using as flag of the up command, watch was blocking process shutdown
Browse files Browse the repository at this point in the history
This happened when sunsetting the application from docker compose down command

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
  • Loading branch information
glours authored and ndeloof committed Jun 20, 2024
1 parent de478f8 commit e1fd7a6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/compose/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,13 @@ func (s *composeService) watch(ctx context.Context, syncChannel chan bool, proje
}
options.LogTo.Log(api.WatchLogger, "Watch enabled")

err = eg.Wait()
for {
select {
case <-ctx.Done():
return err
return eg.Wait()
case <-syncChannel:
options.LogTo.Log(api.WatchLogger, "Watch disabled")
ctx.Done()
return err
return nil
}
}
}
Expand Down

0 comments on commit e1fd7a6

Please sign in to comment.