From 9e2214e5842cb995f8c9d3ad6a6e08cd7a6ea57a Mon Sep 17 00:00:00 2001 From: jvyden Date: Wed, 9 Mar 2022 17:36:04 -0500 Subject: [PATCH] Fix hot reload warmup when listening on 0.0.0.0 --- ProjectLighthouse/Startup/DebugWarmupLifetime.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ProjectLighthouse/Startup/DebugWarmupLifetime.cs b/ProjectLighthouse/Startup/DebugWarmupLifetime.cs index b06083ca..bfe4e7c3 100644 --- a/ProjectLighthouse/Startup/DebugWarmupLifetime.cs +++ b/ProjectLighthouse/Startup/DebugWarmupLifetime.cs @@ -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) {