Found another stupid check that needs to be fixed

This commit is contained in:
ZestyTS 2022-09-09 16:57:43 -07:00
parent 77c13fcd8f
commit 08d75a483d

View file

@ -479,9 +479,8 @@ namespace UWUVCI_AIO_WPF.UI.Windows
{
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "HEAD";
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
response.Close();
return (response.StatusCode == HttpStatusCode.OK);
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
return (response.StatusCode == HttpStatusCode.OK);
}
catch
{