drizzle icon indicating copy to clipboard operation
drizzle copied to clipboard

Polling sagas don't exit when END dispatched

Open gconaty opened this issue 6 years ago • 6 comments

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 avatar Apr 25 '18 17:04 gconaty

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.

gconaty avatar Apr 25 '18 23:04 gconaty

@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 avatar Dec 12 '18 17:12 OnlyOneJMJQ

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.

OnlyOneJMJQ avatar Dec 12 '18 17:12 OnlyOneJMJQ

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] avatar Mar 26 '19 07:03 stale[bot]

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.

stale[bot] avatar Apr 02 '19 07:04 stale[bot]

For 2.0 consideration

cds-amal avatar Sep 26 '19 20:09 cds-amal