Skip to content

Commit

Permalink
fix for context cancelation
Browse files Browse the repository at this point in the history
  • Loading branch information
rafajpet committed Mar 26, 2024
1 parent 494ed41 commit 457faa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/service/mng.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package service

import (
"context"
"errors"
"golang.org/x/sync/errgroup"
)

Expand Down Expand Up @@ -31,7 +32,7 @@ func (m *Manager) StartAndWait(ctx context.Context) error {
service := s
group.Go(func() error {
err := service.Run(ctx)
if err != nil {
if err != nil && !errors.Is(err, context.Canceled) {
return err
}
<-ctx.Done()
Expand Down

0 comments on commit 457faa1

Please sign in to comment.