Closed martinraiberfc closed 1 year ago
Thanks, @martinraiberfc. I'll investigate whether the behavior is considered a bug or not.
-Steve
UPDATE: Thanks for your patience: we can't reproduce the issue as described. So I'll go ahead and close this for now, but we can reopen if it different data comes in.
Thanks! -Steve
@stevewhims FYI. We have encountered this bug while developing a feature for React Native Windows. Had to implement a workaround.
The bug is intermittent, but we'll try to come up with a consistent reproducible case.
@JunielKatarn How did you workaround this issue? We worked around it by setting the HTTP headers in each request. The problem is that I guess that makes the multi-threading bug just harder to hit and we are currently running into this with wider testing.
Setting default headers before using a httpclient causes concurrent access errors (E_CHANGED_STATE: A concurrent or interleaved operation changed the state of the object, invalidating this operation.).
To reproduce see following example: https://gist.github.com/martinraiberfc/46ad7fc6e5c6e2516f09f78d1e234f3e
This perhaps needs to be documented or somehow fixed. As a work-around the headers can be set via a custom request filter.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.