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

experiment with retry logic in transport layer #2003

Open
TalDerei opened this issue Jan 28, 2025 · 0 comments
Open

experiment with retry logic in transport layer #2003

TalDerei opened this issue Jan 28, 2025 · 0 comments
Assignees
Labels
concept refactor Improving existing system with new design

Comments

@TalDerei
Copy link
Contributor

TalDerei commented Jan 28, 2025

the connect method in our transport layer (transport-dom package) doesn't include retry logic. It attempts to establish a connection to the transport channel using getPort(), and rejects with ConnectError on failure. Once the channel transport timeout passes and the poisoned transport channel expires, reloading the page will re-inject the content scripts and init a reconnection by reinitializing the transport layer and creating a new transport object.

this issue scopes out automatic reconnection during the poisoned transport period by using retry logic to detect and failure and attempt to recover by:

  • tearing down the existing transport instance
  • initializing a new transport object
  • attempt to re-establish in an exponential backoff

this would enable reconnections without reloading the page.

supplemental context doc: https://gist.github.com/turbocrime/091ebaf4da4cd922fa8c19cf0fa53244

@TalDerei TalDerei added refactor Improving existing system with new design concept labels Jan 28, 2025
@turbocrime turbocrime self-assigned this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concept refactor Improving existing system with new design
Projects
None yet
Development

No branches or pull requests

2 participants