Skip to content

Commit d03d5ac

Browse files
committed
ModApi.UpdateManager: misc changes
1 parent 3937463 commit d03d5ac

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

ModApi.UpdateManager/DllsUpdater.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ public class GithubRelease
2929

3030
private static string GithubRequestGET(string uri)
3131
{
32-
var downloadClient = new DownloadClient(uri);
33-
downloadClient.AddHeader("Accept", "application/vnd.github.v3+json");
34-
return downloadClient.DownloadString();
32+
using (var downloadClient = new DownloadClient(uri))
33+
{
34+
downloadClient.AddHeader("Accept", "application/vnd.github.v3+json");
35+
return downloadClient.DownloadString();
36+
}
3537
}
3638

3739
private static GithubRelease GetLatestGithubRelease(string repoUser, string repoName)

ModApi.UpdateManager/DownloadClient.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.IO;
4-
using System.Linq;
53
using System.Net.Http;
6-
using System.Text;
7-
using System.Threading.Tasks;
8-
using System.Windows.Forms;
94

105
namespace ModApi.UpdateManager
116
{

0 commit comments

Comments
 (0)