Skip to content

Fixed NullReferenceException on parallel requests #728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2020
Merged

Fixed NullReferenceException on parallel requests #728

merged 1 commit into from
Apr 29, 2020

Conversation

bart-degreed
Copy link
Contributor

At startup, a single instance of CurrentRequestMiddleware is created, which is used to process multiple requests in parallel. Therefore it cannot contain request-specific state in its fields, because parallel requests then overwrite the state of each other.

As a result of overwriting state, the FilterService is unable to find the matching CurrentRequest data, causing a NullReferenceException in its constructor.

Fixes #727.

…d, which is used to process multiple requests in parallel. Therefore it cannot contain request-specific state in its fields, because parallel requests then overwrite the state of each other.

As a result of overwriting state, the FilterService is unable to find the matching CurrentRequest data, causing a NullReferenceException in its constructor.
@bart-degreed bart-degreed requested a review from maurei April 29, 2020 10:02
@maurei maurei merged commit 6b16ea3 into json-api-dotnet:master Apr 29, 2020
@bart-degreed bart-degreed deleted the parallel-requests-fix branch April 29, 2020 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Possible bug: NullReferenceException during request processing
2 participants