title: Can't get HttpClient.PostAsync to timeout or cancel at specified times
body: <p>I'm trying like crazy to get an httpclient to timeout / cancel when I want it to, but it doesn't seem to want to behave.  Perhaps I'm missing something, but I don't see what.</p>
  
  <p>Here's some sample code:</p>
  
  <p>Getting the response:</p>
  
  <pre><code>response = await _httpClient.PostAsync(uri, httpContent, cancellationToken)
                                              .ConfigureAwait(false);
  </code></pre>
  
  <p>The cancellationToken I'm passing is defined as such:</p>
  
  <pre><code>new CancellationTokenSource(1500).Token
  </code></pre>
  
  <p>Elsewhere, the <code>_httpClient</code> object has a timeout set to 2 seconds.  So, in theory, the client should timeout in 2 seconds, but the cancellation token should cancel the task in 1.5 seconds.  In debug, this works as expected, until I push to prod (which is under heavy use).  Here's a sample of my output on the server</p>
  
  <pre><code>/*
  Time    - Time to process - Number of messages received in request
  
  9:21:03 - 0:00:01.4993753 - 32
  9:21:09 - 0:00:05.9434192 - A task was canceled.
  9:21:09 - 0:00:00.1578903 - 100
  9:21:22 - 0:00:12.7766748 - A task was canceled.
  9:21:22 - 0:00:00.2524834 - 100
  9:21:24 - 0:00:01.5173511 - A task was canceled.
  9:21:25 - 0:00:01.1389706 - 100
  9:21:26 - 0:00:00.6778574 - 100
  9:21:54 - 0:00:28.1702439 - Request timed out
  9:21:54 - 0:00:00.0986419 - 100
  9:22:03 - 0:00:08.8602139 - Request timed out
  9:22:03 - 0:00:00.1110512 - 100
  9:22:25 - 0:00:21.3999828 - 100
  */
  </code></pre>
  
  <p>As you can see, some requests are taking over 20 seconds.  Sometimes it works like it should.  This... shouldn't even be possible.  Can anyone explain this behaviour?</p>