title: How to cancel a running network request in redux-saga?
body: <p>I have a saga:</p>
  <pre><code>function* sagaOne() {
     yield call(apiOne);
     yield call(apiTwo);
     yield call(apiThree);
  }
  
  function* sagaTwo() {
     try {
        yield all(users.map((user) =&gt; call(sagaOne, user));
        yield put(successAction);
     } catch (err) {
       yield put(errAction);
     }
  }
  
  function* sagaThree() {
     const task = yield fork(sagaTwo);
     yield take(CancelAction);
     yield cancel(task);
  }
  </code></pre>
  <p>My problem is - when <code>sagaThree</code> fires, it forks <code>sagaTwo</code>. If I dispatch cancel the action and <code>sagaOne</code> is already in a deeper state - <code>apiOne</code> call already resolved and <code>apiTwo</code> started, the whole request is not canceled.</p>
  <h2>Question: how to properly cancel a &quot;deeper&quot;, &quot;nested&quot; task (sagaOne), when it's already at 2nd yield or 3rd?</h2>
  <p>Summing up: cancellation works only if I cancel the task immediately after start and none of the <code>apiTwo</code> hasn't started yet. If it goes deeper, the cancellation doesn't work and every call inside every <code>sagaOne</code> resolves.</p>