From 307513e3f7a75ec999c395a8125d413f17c11dd9 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Sun, 7 Jul 2024 17:30:44 -0400 Subject: [PATCH] part 2 [goreleaser] --- services/rfq/relayer/service/relayer.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/services/rfq/relayer/service/relayer.go b/services/rfq/relayer/service/relayer.go index 78499e7637..22d0b3a91b 100644 --- a/services/rfq/relayer/service/relayer.go +++ b/services/rfq/relayer/service/relayer.go @@ -2,6 +2,7 @@ package service import ( "context" + "errors" "fmt" "math/big" "sync" @@ -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 } return nil })