title: @angular @ngrx/effects HTTP Request Keeps Canceling and Retrying
body: <p>I have a very simple effect in place that makes a http request and dispatches an action when it's complete. </p>
  
  <p>The HTTP request is constantly canceled and remade over and over. </p>
  
  <p><a href="https://i.stack.imgur.com/v1q1J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v1q1J.png" alt="enter image description here"></a></p>
  
  <p>Originally I thought it was switchMap that was causing the issue (canceling the observable) so I tried using mergeMap (same result).</p>
  
  <p>Below is my code for the effect. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>signIn$ = this.actions$
    .ofType(ACTIONS.AUTH.SIGN_IN)
    .map(toPayload)
    .map(payload =&gt; toInput(payload))
    .switchMap(input =&gt; this.http
        .post&lt;Output&gt;(`${GLOBALS.endpoint}/auth/authenticate`, input)
        .map(output =&gt; ({ type: ACTIONS.APP.PUSH_NOTIFICATION, payload: "test" }))
        .catch(error =&gt; of(createAction(ACTIONS.APP.LOG_EXCEPTION, error)))
    );</code></pre>
  </div>
  </div>
  </p>
  
  <p>The above code compiles without errors and works as expected, except the fact that it keeps canceling and remaking the http request. </p>
  
  <p>I don't know if it matters but I am using the HttpClient (@angular/common/http), not @angular/http. </p>
  
  <p>Any advice would be greatly appreciated! </p>