Skip to content

Commit

Permalink
Use startstop.StartAll helper to start services
Browse files Browse the repository at this point in the history
While working on something else just noticed there was a comment to
switch over to `startstop.StartAll` for starting all services once that
was available through `rivershared`. It's in there now, so switch over.
  • Loading branch information
brandur committed Dec 24, 2024
1 parent da79d1f commit 4cf2e8f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,8 @@ func (s *Server) Start(ctx context.Context) error {
return nil
}

// TODO: Replace with startstop.StartAll when possible.
for _, service := range s.services {
if err := service.Start(ctx); err != nil {
return err
}
if err := startstop.StartAll(ctx, s.services...); err != nil {
return err
}

go func() {
Expand Down

0 comments on commit 4cf2e8f

Please sign in to comment.