Fix hot reload warmup when listening on 0.0.0.0

This commit is contained in:
jvyden 2022-03-09 17:36:04 -05:00
commit 9e2214e584
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -37,10 +37,13 @@ public class DebugWarmupLifetime : IHostLifetime
{
using HttpClient client = new();
string url = ServerSettings.Instance.ServerListenUrl;
url = url.Replace("0.0.0.0", "127.0.0.1");
Logger.Log("Warming up Hot Reload...", LoggerLevelStartup.Instance);
try
{
client.GetAsync(ServerSettings.Instance.ServerListenUrl).Wait();
client.GetAsync(url).Wait();
}
catch(Exception e)
{