Skip to content

Commit 30ce85a

Browse files
committed
Fix bug with not set ResponseStatus.Aborted if the request was aborted just after starting.
1 parent 9ee6d0e commit 30ce85a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RestSharp/Http.Async.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private void RequestStreamCallback(IAsyncResult result, Action<HttpResponse> cal
224224
HttpResponse response;
225225
if (ex is WebException && ((WebException)ex).Status == WebExceptionStatus.RequestCanceled)
226226
{
227-
response = new HttpResponse {ResponseStatus = ResponseStatus.TimedOut};
227+
response = new HttpResponse {ResponseStatus = _timeoutState.TimedOut ? ResponseStatus.TimedOut : ResponseStatus.Aborted};
228228
ExecuteCallback (response, callback);
229229
return;
230230
}

0 commit comments

Comments
 (0)