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

"Search" continues after you navigate away from the page #89

Open
NfNitLoop opened this issue Sep 6, 2022 · 1 comment
Open

"Search" continues after you navigate away from the page #89

NfNitLoop opened this issue Sep 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@NfNitLoop
Copy link
Owner

To reproduce:

  1. On the feed page, start a text-based search.
  2. when an item shows up, click the link to navigate to its page.
  3. View the network control panel in the browser.

Expected:

  • No more search-related traffic

Observed:

  • The browser is still loading posts from my feed trying to perform the brute-force search.

This is probably because of the current use of Async Generators that don't have a mechanism to get canceled.

https://seg.phault.net/blog/2018/03/async-iterators-cancellation/ has a good writeup.

Maybe I can just reuse the AbortController and pass that into the async generators, and make sure to abort it when the page is unloaded.

@NfNitLoop NfNitLoop added the bug Something isn't working label Sep 6, 2022
@NfNitLoop
Copy link
Owner Author

Related, see: #78 for showing status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant