Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pkg/compose/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (c *monitor) Start(ctx context.Context) error {
}
restarting := utils.Set[string]{}

evtCh, errCh := c.api.Events(ctx, events.ListOptions{
evtCh, errCh := c.api.Events(context.Background(), events.ListOptions{
Filters: filters.NewArgs(
filters.Arg("type", "container"),
projectFilter(c.project)),
Expand All @@ -89,8 +89,6 @@ func (c *monitor) Start(ctx context.Context) error {
return nil
}
select {
case <-ctx.Done():
return nil
case err := <-errCh:
return err
case event := <-evtCh:
Expand Down
4 changes: 2 additions & 2 deletions pkg/compose/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
eg.Go(func() error {
first := true
gracefulTeardown := func() {
first = false
tui.ApplicationTermination()
eg.Go(func() error {
return progress.RunWithLog(context.WithoutCancel(ctx), func(ctx context.Context) error {
Expand All @@ -121,7 +122,6 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
}, s.stdinfo(), logConsumer)
})
isTerminated.Store(true)
first = false
}

for {
Expand Down Expand Up @@ -238,7 +238,7 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
})

eg.Go(func() error {
err := monitor.Start(ctx)
err := monitor.Start(context.Background())
// Signal for the signal-handler goroutines to stop
close(doneCh)
return err
Expand Down