Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(op-service): fallback client failed to switch URL in txmgr #232

Merged

Conversation

welkin22
Copy link
Contributor

Description

When initializing txmgr, the context passed to DialEthClientWithTimeoutAndFallback is one that will be immediately closed, which I did not notice. When a switch occurs, the fallback client uses the already closed context to establish a connection with the next URL, causing the switch to fail.

Rationale

Modify the code to use context.Background() in clientInitFunc to ensure a successful connection to the next URL.

Example

none

Changes

Notable changes:

  • Modified the logic in DialEthClientWithTimeoutAndFallback
  • ...

@bnoieh bnoieh merged commit fe22f19 into bnb-chain:merge-upstream-v1.7.7 Aug 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants