diff --git a/ProjectLighthouse/Startup/DebugWarmupLifetime.cs b/ProjectLighthouse/Startup/DebugWarmupLifetime.cs index 8454289c..b06083ca 100644 --- a/ProjectLighthouse/Startup/DebugWarmupLifetime.cs +++ b/ProjectLighthouse/Startup/DebugWarmupLifetime.cs @@ -38,7 +38,16 @@ public class DebugWarmupLifetime : IHostLifetime using HttpClient client = new(); Logger.Log("Warming up Hot Reload...", LoggerLevelStartup.Instance); - client.GetAsync(ServerSettings.Instance.ServerListenUrl).Wait(); + try + { + client.GetAsync(ServerSettings.Instance.ServerListenUrl).Wait(); + } + catch(Exception e) + { + Logger.Log("An error occurred while attempting to warm up hot reload. Initial page load will be delayed.", LoggerLevelStartup.Instance); + Logger.Log(e.Message, LoggerLevelStartup.Instance); + return; + } Logger.Log("Hot Reload is ready to go!", LoggerLevelStartup.Instance); }