restsharp / RestSharp

Simple REST and HTTP API Client for .NET
https://restsharp.dev
Apache License 2.0
9.62k stars 2.34k forks source link

Request timed out #2176

Open dongzhaosheng73 opened 7 months ago

dongzhaosheng73 commented 7 months ago

Describe the bug The client occasionally sends System.TimeoutException: Request timed out ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. The error client occasionally sends System.TimeoutException: Request timed out ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. mistake.

To Reproduce In random recurrence, either the client must be restarted or HttpClient must use a new socket. I found that there were already similar problems but there was no practical solution.

https://github.com/restsharp/RestSharp/issues/1092

Expected behavior Request timed out should not affect subsequent request behavior Request timed out Subsequent requests will cause the Request timed out until the client restarts

Stack trace Copy the full stack trace here if you get an exception.

Desktop (please complete the following information):

alexeyzimarev commented 7 months ago

I can add a test that would execute a series of calls using the same client instance, timing out at random. If that test won't reproduce the issue, I don't think there will be any follow up on that.