Skip to content

Conversation

@halter73
Copy link
Member

I missed adding a lock to PassthroughIfAllFlushesAreAwaited the last time I fixed this class in #12383.

I thought it was unnecessary because it was passthrough, but if we don't lock there's a race between calling _currentFlushTcs.SetResult(flushResult) and nulling out the TCS to go back into passthrough mode. The race seems pretty rare, but I've seen it twice now.

I could have reordered SetResult and nulling out the field, but since this is always done with a lock in practice, I decided to just update the test so it locks like all the other test methods in the class.

Addresses aspnet/AspNetCore-Internal#2839

@halter73 halter73 merged commit 5d0b314 into release/3.0 Aug 30, 2019
@halter73 halter73 deleted the halter73/2839 branch August 30, 2019 17:35
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants