NfNitLoop / feoblog

A distributed, cryptographically-verifiable blog / social network
Other
71 stars 4 forks source link

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

Open NfNitLoop opened 2 years ago

NfNitLoop commented 2 years ago

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:

Observed:

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 commented 2 years ago

Related, see: #78 for showing status.