Skip to content

Commit

Permalink
Further fixes to web request timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-b-higgins committed Feb 21, 2012
1 parent c76f7aa commit 7bdc9b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 36 deletions.
1 change: 0 additions & 1 deletion Source/Hudson.Core/Hudson.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\BuildService.cs" />
<Compile Include="Services\JobService.cs" />
<Compile Include="Services\Retry.cs" />
<Compile Include="Services\XmlService.cs" />
<Compile Include="Services\ServerService.cs" />
<Compile Include="Core\XmlApiPrepender.cs" />
Expand Down
33 changes: 0 additions & 33 deletions Source/Hudson.Core/Services/Retry.cs

This file was deleted.

6 changes: 4 additions & 2 deletions Source/Hudson.Core/Services/XmlService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,20 @@ public XmlPage GetPage(Uri url)
var request = WebRequest.Create(url);

request.Method = "GET";
request.Timeout = 10000;
request.Timeout = 90000;

if (Context.RequireAuthentication)
{
request.PreAuthenticate = true;

var authInfo = Context.Username + ":" + Context.Password;

authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));

request.Headers["Authorization"] = "Basic " + authInfo;
}

using (var response = Retry.This(request.GetResponse, 3, 20000))
using (var response = request.GetResponse())
{
using (var stream = response.GetResponseStream())
{
Expand Down

0 comments on commit 7bdc9b5

Please sign in to comment.