Skip to content

Commit

Permalink
test ctx cancellation on transmit
Browse files Browse the repository at this point in the history
  • Loading branch information
brunotm committed Dec 16, 2024
1 parent bd0296a commit c113d09
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/services/relay/evm/mercury/transmitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
mercuryutils "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils"
"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc"
"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb"
"github.com/smartcontractkit/chainlink/v2/core/utils"
)

const (
Expand Down Expand Up @@ -235,9 +234,9 @@ func (s *server) runQueueLoop(stopCh services.StopChan, wg *sync.WaitGroup, feed
return
}
res, err := func(ctx context.Context) (*pb.TransmitResponse, error) {
ctx, cancel := context.WithTimeout(ctx, utils.WithJitter(s.transmitTimeout))
cancel()
return s.c.Transmit(ctx, t.Req)
// ctx, cancel := context.WithTimeout(ctx, utils.WithJitter(s.transmitTimeout))
// cancel()
return s.c.Transmit(context.Background(), t.Req)
}(ctx)
if ctx.Err() != nil {
// only canceled on transmitter close so we can exit
Expand Down

0 comments on commit c113d09

Please sign in to comment.