From 6ca94f8da8b0cb14c8cf346cb56db80609d63600 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Tue, 1 Feb 2022 14:27:16 -0600 Subject: [PATCH] only default to IPv4 when parsing update postgres target version to 12.9 --- Application/Extensions/StartupExtensions.cs | 2 +- Application/IW4MServer.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Application/Extensions/StartupExtensions.cs b/Application/Extensions/StartupExtensions.cs index 96517db95..907ac8899 100644 --- a/Application/Extensions/StartupExtensions.cs +++ b/Application/Extensions/StartupExtensions.cs @@ -94,7 +94,7 @@ namespace IW4MAdmin.Application.Extensions postgresqlOptions => { postgresqlOptions.EnableRetryOnFailure(); - postgresqlOptions.SetPostgresVersion(new Version("9.4")); + postgresqlOptions.SetPostgresVersion(new Version("12.9")); }) .UseLoggerFactory(sp.GetRequiredService()).Options); return services; diff --git a/Application/IW4MServer.cs b/Application/IW4MServer.cs index b21d174cb..a7e092e8c 100644 --- a/Application/IW4MServer.cs +++ b/Application/IW4MServer.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; +using System.Net.Sockets; using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; @@ -25,7 +26,6 @@ using Data.Models; using Data.Models.Server; using IW4MAdmin.Application.Commands; using Microsoft.EntityFrameworkCore; -using SharedLibraryCore.Formatting; using static Data.Models.Client.EFClient; namespace IW4MAdmin @@ -1076,7 +1076,10 @@ namespace IW4MAdmin { try { - ResolvedIpEndPoint = new IPEndPoint((await Dns.GetHostAddressesAsync(IP)).First(), Port); + ResolvedIpEndPoint = + new IPEndPoint( + (await Dns.GetHostAddressesAsync(IP)).First(address => + address.AddressFamily == AddressFamily.InterNetwork), Port); } catch (Exception ex) {