diff --git a/core/services/relay/evm/mercury/wsrpc/client.go b/core/services/relay/evm/mercury/wsrpc/client.go index ebd282e6093..f91678082b3 100644 --- a/core/services/relay/evm/mercury/wsrpc/client.go +++ b/core/services/relay/evm/mercury/wsrpc/client.go @@ -224,9 +224,15 @@ func (w *client) resetTransport() { ctx, cancel := w.chStop.NewCtx() defer cancel() b := utils.NewRedialBackoff() + var cnt int for { - // Will block until successful dial, or context is canceled (i.e. on close) - err := w.dial(ctx, wsrpc.WithBlock()) + cnt++ + w.logger.Warnw("ResetTransport resetting transport", "attempt", cnt) + // Will block until successful dial, or context is canceled + // If it takes longer than 5 seconds to try to dial, abort and retry to avoid getting stuck + loopCtx, cancel := context.WithTimeout(ctx, 5*time.Second) + err := w.dial(loopCtx, wsrpc.WithBlock()) + cancel() if err == nil { break } diff --git a/package.json b/package.json index 8a0b5a3ed5d..1dbec45f0c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chainlink", - "version": "2.19.0", + "version": "2.19.1", "description": "node of the decentralized oracle network, bridging on and off-chain computation", "main": "index.js", "scripts": { @@ -26,4 +26,4 @@ "@changesets/get-github-info": "^0.6.0", "semver": "^7.6.3" } -} \ No newline at end of file +}