Closed
requested to merge github/fork/TORISOUP/csharp-netcore/httpclient-timeout-cancellationtoken into master
Created by: TORISOUP
What is the issue
- Configuration.Timeout is not applied correctly using HttpClient.
Correction details
Fixed to use CancellationToken generated when configuration.Timeout is set.
Using Declaration
is not used for compatibility, and finally
is used to avoid unnecessary allocations.
How to validate the work
- Set an extremely small value (e.g., 1 ms) in configuration.Timeout and execute the communication in production.
- At this time, check that a TaskCanceledException is thrown and the process is aborted.
PR checklist
-
Read the contribution guidelines. -
Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. -
Run the following to build the project and update samples: ./mvnw clean package ./bin/generate-samples.sh ./bin/utils/export_docs_generators.sh
./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH. -
If your PR is targeting a particular programming language
@mandrean @frankyjuang @shibayan @Blackclaws @lucamazzanti