Resetting _waitForCompletion to null was removed from DuplexContent (#35010)
authorAlexander Nikolaev <55398552+alnikola@users.noreply.github.com>
Fri, 17 Apr 2020 11:52:09 +0000 (13:52 +0200)
committerGitHub <noreply@github.com>
Fri, 17 Apr 2020 11:52:09 +0000 (13:52 +0200)
commit9fd1e2309a1e90834d9f3f5459f3f0027c385002
treeb2e542cc0667b4eaf30b4f40eae4281b7ceb1c5d
parent2e7dc5acdcc361961123d3f35c536176de97b940
Resetting _waitForCompletion to null was removed from DuplexContent (#35010)

`_waitForCompletion` gets reset to null in `DuplexContent.Complete` and `Fail` which leads to race condition with `SerializeToStreamAsync`. This reset seems redundant since `_waitForCompletion` is always unconditionally initialized on each call to `SerializeToStreamAsync`. This PR removes that reset logic.

Fixes #33141
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs