mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
HttpProvider.PostCommand will no longer keep the connection alive
This commit is contained in:
parent
3c47df8691
commit
b3fb807f41
38 changed files with 60 additions and 3 deletions
19
src/NzbDrone.Common/Http/NzbDroneWebClient.cs
Normal file
19
src/NzbDrone.Common/Http/NzbDroneWebClient.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue