drizzle
drizzle copied to clipboard
Polling sagas don't exit when END dispatched
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.
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 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?
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.
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.
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.
For 2.0 consideration