From e1d08a936c1bba0f4fa68fe71a8163ed5d83f851 Mon Sep 17 00:00:00 2001 From: xk0gap Date: Thu, 1 Mar 2018 19:57:35 -0500 Subject: [PATCH] NSUrlSessionHandler: TimeoutInterval to TotalSeconds rather than Seconds The setting of: rq.TimeoutInterval = Timeout.Value.Seconds; Should be: rq.TimeoutInterval = Timeout.Value.TotalSeconds; so that the TimeoutInterval is set to the TimeSpan in seconds rather than the seconds part of the Timespan which would be zero for any whole minute. --- src/ModernHttpClient/iOS/NSUrlSessionHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ModernHttpClient/iOS/NSUrlSessionHandler.cs b/src/ModernHttpClient/iOS/NSUrlSessionHandler.cs index cda825a..c25ede3 100644 --- a/src/ModernHttpClient/iOS/NSUrlSessionHandler.cs +++ b/src/ModernHttpClient/iOS/NSUrlSessionHandler.cs @@ -131,7 +131,7 @@ protected override async Task SendAsync(HttpRequestMessage }; if (Timeout != null) - rq.TimeoutInterval = Timeout.Value.Seconds; + rq.TimeoutInterval = Timeout.Value.TotalSeconds; var op = session.CreateDataTask(rq);