{"action":"created","issue":{"url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1355","repository_url":"https://api.github.com/repos/redux-saga/redux-saga","labels_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1355/labels{/name}","comments_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1355/comments","events_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1355/events","html_url":"https://github.com/redux-saga/redux-saga/issues/1355","id":302987048,"number":1355,"title":"Saga don't cancelled, but isCancelled() === true","user":{"login":"borovik96","id":9018702,"avatar_url":"https://avatars2.githubusercontent.com/u/9018702?v=4","gravatar_id":"","url":"https://api.github.com/users/borovik96","html_url":"https://github.com/borovik96","followers_url":"https://api.github.com/users/borovik96/followers","following_url":"https://api.github.com/users/borovik96/following{/other_user}","gists_url":"https://api.github.com/users/borovik96/gists{/gist_id}","starred_url":"https://api.github.com/users/borovik96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borovik96/subscriptions","organizations_url":"https://api.github.com/users/borovik96/orgs","repos_url":"https://api.github.com/users/borovik96/repos","events_url":"https://api.github.com/users/borovik96/events{/privacy}","received_events_url":"https://api.github.com/users/borovik96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-07T07:06:43Z","updated_at":"2018-03-07T08:17:27Z","closed_at":null,"author_association":"NONE","body":"I have this code:\r\n[![Edit Saga](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/5v7z51zyn4)\r\n\r\nIf you click cancel button and see to console, you will get \r\n![image](https://user-images.githubusercontent.com/9018702/37078158-245cd6ee-21ef-11e8-8f9a-f234460e3de4.png)\r\n"},"comment":{"url":"https://api.github.com/repos/redux-saga/redux-saga/issues/comments/371059057","html_url":"https://github.com/redux-saga/redux-saga/issues/1355#issuecomment-371059057","issue_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1355","id":371059057,"user":{"login":"Andarist","id":9800850,"avatar_url":"https://avatars2.githubusercontent.com/u/9800850?v=4","gravatar_id":"","url":"https://api.github.com/users/Andarist","html_url":"https://github.com/Andarist","followers_url":"https://api.github.com/users/Andarist/followers","following_url":"https://api.github.com/users/Andarist/following{/other_user}","gists_url":"https://api.github.com/users/Andarist/gists{/gist_id}","starred_url":"https://api.github.com/users/Andarist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andarist/subscriptions","organizations_url":"https://api.github.com/users/Andarist/orgs","repos_url":"https://api.github.com/users/Andarist/repos","events_url":"https://api.github.com/users/Andarist/events{/privacy}","received_events_url":"https://api.github.com/users/Andarist/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T08:17:27Z","updated_at":"2018-03-07T08:17:27Z","author_association":"OWNER","body":"Thanks for sharing a codesandbox it let me identify the issue way quicker than it would be possible without it.\r\n\r\nThe problem is that your \"Is really canceled ?\" is comming from NEXT \"instance\" of `handleWeb3Actions`. You can verify it by looking into the console, you will actually see this:\r\n```\r\n\"Is really canceled ? \" false // this is from the first instance that you are going to cancel in the future\r\nweb3 chanel\r\nweb3 chanel\r\nweb3 chanel\r\nweb3 chanel\r\n// dispatch cancellation action\r\n\".isCancelled()\" true // this is about first instance\r\n\"Is really canceled ? \" false // this happens immediately in second instance, because it reaches the `finally` block\r\n```\r\n\r\nThe reason is because `takeEvery` is non-blocking so you allow saga reaching your `finally` block prematurely. You should block your saga so the cancellation could work:\r\n- either by joining a forked (from takeEvery) task\r\n- writing takeEvery manually with while(true) loop - it would block your saga in the loop"}}
{"actor":{"display_login":"Andarist"}}