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

Reconnection Logic #2743

Merged
merged 3 commits into from Mar 1, 2024
Merged

Reconnection Logic #2743

merged 3 commits into from Mar 1, 2024

Conversation

Yummy-Yums
Copy link
Contributor

@Yummy-Yums Yummy-Yums commented Feb 28, 2024

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

After these steps, you're ready to open a pull request.

a. Give a descriptive title to your PR.

b. Describe your changes.

c. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).

@Yummy-Yums
Copy link
Contributor Author

closes #2728

@Yummy-Yums
Copy link
Contributor Author

Yummy-Yums commented Feb 28, 2024

@Alek99 i tested it by running reflex run --frontend-only to simulate a broken cxn and reflex run just by checking if socket is connected

image

@picklelo
Copy link
Contributor

@Yummy-Yums in your testing, do you see the error occur when we don't have your changes? I'm trying to test this out - it seems to be working, but I can't reproduce the broken case locally to understand if the fix is working.

@Yummy-Yums
Copy link
Contributor Author

Yummy-Yums commented Feb 29, 2024

@picklelo I ran reflex run --frontend-only to simulate a "broken cxn" to test, but realized that it simulates a "no cxn" since websockets need to be established for both parties, for even a broken cxn to happen. Also, based on the error (pic below) in the reflex docs in prod which I trigger by disrupting my internet cxn

image

on second thought, @Alek99 can I get the steps to repro this issue below? i used plain js to simulate an old tab but not sure whether it reflects ur standpoint

image

@masenf masenf merged commit 7725c48 into reflex-dev:main Mar 1, 2024
45 checks passed
@picklelo
Copy link
Contributor

picklelo commented Mar 1, 2024

@Yummy-Yums I believe this issue only happens when the tab has been open for a really long time (like days potentially) so it's hard to test for. I think your code should work, we will see when we redeploy the website whether people still run into this issue. Thanks for the contribution!

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.

None yet

3 participants