Skip to content

Commit

Permalink
part 2 [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Jul 7, 2024
1 parent a5f075c commit 307513e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions services/rfq/relayer/service/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package service

import (
"context"
"errors"
"fmt"
"math/big"
"sync"
Expand Down Expand Up @@ -237,9 +238,12 @@ func (r *Relayer) Start(ctx context.Context) (err error) {
})

g.Go(func() error {
err := r.submitter.Start(ctx)
if err != nil {
return fmt.Errorf("could not start submitter: %w", err)
if !r.submitter.Started() {
err := r.submitter.Start(ctx)
if err != nil && !errors.Is(err, submitter.ErrSubmitterAlreadyStarted) {
return fmt.Errorf("could not start submitter: %w", err)
}
return nil

Check warning on line 246 in services/rfq/relayer/service/relayer.go

View check run for this annotation

Codecov / codecov/patch

services/rfq/relayer/service/relayer.go#L241-L246

Added lines #L241 - L246 were not covered by tests
}
return nil
})
Expand Down

0 comments on commit 307513e

Please sign in to comment.