Skip to content
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

The HttpRequestMessage reuse leads to the exception #31

Closed
yzhoholiev opened this issue Dec 14, 2022 · 1 comment
Closed

The HttpRequestMessage reuse leads to the exception #31

yzhoholiev opened this issue Dec 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@yzhoholiev
Copy link

Given: send the query
When: the session is expired
Then: the request should be retried with the newly obtained session

Expected result: The request is successfully made.
Actual result: The exception is thrown:

System.InvalidOperationException: The request message was already sent. Cannot send the same request message multiple times.

The issue is in the HttpRequestMessage instance reuse during the retry. A new instance should be created for every request.

response = await _restClient.SendAsync<QueryExecResponse>(queryRequest, ct).ConfigureAwait(false);

@fixer-m fixer-m added the bug Something isn't working label Dec 28, 2022
@fixer-m
Copy link
Owner

fixer-m commented Jan 1, 2023

@yzhoholiev Hi!
Thanks for this report! This should be fixed now in 0.4.4.

@fixer-m fixer-m closed this as completed Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants