Last small changes

This commit is contained in:
EntenKoeniq
2022-04-19 07:41:39 +02:00
parent fca85e34e3
commit f5c9d8fc0b
5 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<AssemblyVersion>1.52.3.0001</AssemblyVersion>
<AssemblyVersion>1.52.6.0001</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<RepositoryUrl>https://github.com/GTACOOP-R/GTACoop-R</RepositoryUrl>
</PropertyGroup>

View File

@ -96,9 +96,9 @@ namespace CoopServer
try
{
HttpResponseMessage response = await httpClient.GetAsync("https://ipinfo.io/json");
if (!response.IsSuccessStatusCode)
if (response.StatusCode != HttpStatusCode.OK)
{
throw new Exception("IPv4 request failed!");
throw new Exception($"IPv4 request failed! [{(int)response.StatusCode}/{response.ReasonPhrase}]");
}
string content = await response.Content.ReadAsStringAsync();