HttpProvider.PostCommand will no longer keep the connection alive

This commit is contained in:
Mark McDowall 2014-05-10 21:37:07 -07:00
commit b3fb807f41
38 changed files with 60 additions and 3 deletions

View file

@ -0,0 +1,19 @@
using System;
using System.Net;
namespace NzbDrone.Common.Http
{
public class NzbDroneWebClient : WebClient
{
protected override WebRequest GetWebRequest(Uri address)
{
var request = base.GetWebRequest(address);
if (request is HttpWebRequest)
{
((HttpWebRequest)request).KeepAlive = false;
}
return request;
}
}
}