Skip to content

Commit

Permalink
Refactor: Set the timeout for HttpWebRequest using Timespan.FromMinutes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Barratt committed Oct 22, 2012
1 parent 020ffde commit cf98772
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/XeroApi/OAuth/Consumer/ConsumerRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public virtual HttpWebRequest ToWebRequest()
RequestDescription description = GetRequestDescription();

var request = (HttpWebRequest) WebRequest.Create(description.Url);
request.Timeout = 1000 * 60 * 3;
request.Timeout = (int) TimeSpan.FromMinutes(3).TotalMilliseconds;
request.Method = description.Method;
request.UserAgent = _consumerContext.UserAgent;

Expand Down

0 comments on commit cf98772

Please sign in to comment.