trufflesuite / drizzle

Reactive Ethereum dapp UI suite
906 stars 237 forks source link

Polling sagas don't exit when END dispatched #37

Open gconaty opened 6 years ago

gconaty commented 6 years ago

I've got an app using NextJS and redux where when switching pages, "END" is dispatched to the saga middleware, hopefully to shut the whole thing down. However the block polling channel and the account polling channels do not stop. While they provide a unsubscribe method, it never gets called.

gconaty commented 6 years ago

After some more hacking it looks like perhaps redux-saga doesn't cascade END to other channels. I was able to somewhat work around this by doing a yield cancelled() and closing the channel. In general however, I found it's not feasibly currently to stop the saga and then restart.

OnlyOneJMJQ commented 5 years ago

@gconaty To clarify that I'm understanding your correct: you're able to stop the polling with yield cancelled(); the issue is restarting the polling afterwards?

OnlyOneJMJQ commented 5 years ago

Tagged for 2.0 because polling will be fully supplanted by subscriptions, but we will probably want some more manual control over the subscription status.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments.

cds-amal commented 4 years ago

For 2.0 consideration