title: Why does unsubscribe cancels current concatMap which is performing http request?
body: <p>This is my code:</p>
  <pre><code>// showing code of FileUploadService
  private uploadFilesSubscription?: Subscription;
  ... 
  
  // end upload of files
  public stop(): void {
    this.uploadFilesSubscription?.unsubscribe();
  }
  
  // start upload of files
  public start(): void {
  
     const uploadFiles$: Observable&lt;FileResponseModel&gt; = from(this.filesToUpload)
    .pipe(
      concatMap((f: FileModel, index: number): Observable&lt;any&gt; =&gt; {
        this.fileUploadInProgress.next(f);
  
        return this.documentService.createFile(f)
          .pipe(
            // continue if one of the files failed to upload
            // max POST size reached, .....
            catchError((error: WebApiErrorModel): Observable&lt;any&gt; =&gt; {
              this.currentFileUploadFailed.next(error.errors);
  
              return of('continue');
            })
          );
      })
    );
  
  this.uploadFilesSubscription = uploadFiles$.subscribe({
    next: (r: FileResponseModel) =&gt; {
      console.log('next');
    },
    error: (error: WebApiErrorModel): void =&gt; {
      console.log('error occured');
    },
    complete: (): void =&gt; {
      console.log('Completed ok');
      this.attemptToUploadAllFilesCompleted.next();
    }
  });
  </code></pre>
  <p>Everything works as it should, except when user wants to navigate away from current page,  we must cancel pending files for uploading.</p>
  <p>For this I used canDeactivate method in routes:</p>
  <pre><code>const routes: Routes = [
  {
    path: '',
    canActivateChild: [CanActivatePage],
    children: [
      { path: '', redirectTo: 'documents', pathMatch: 'full' },
      { path: 'all-files', component: DocumentsHomeComponent, canDeactivate: [CanDeactivatePage] },
      { path: 'all-files/:id', component: DocumentsHomeComponent },
    ]
  }
  ];
  </code></pre>
  <p>What is interesting to me is, that if I call unsubscribe, current POST request is canceled as well. It looks like a concatMap is cancelled as well. I'm staying inside angular spa application.</p>
  <p>Shouldn't unsubscribe cancel all pending operators that are in pipe queue? Why doesn't concatMap finish and then stops fetching new data from 'from' array.</p>
  <p>I thought that at least current http request completes (ok or fails) and then all next reqeusts are stopped.</p>
  <p><a href="https://i.stack.imgur.com/mbyxB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mbyxB.png" alt="enter image description here" /></a></p>