From 5fb507febccdbf32dbb72fe6c55404d4450009c8 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Fri, 12 Apr 2024 10:41:54 +0200 Subject: [PATCH] Handle node booting state in the server console websocket --- .../Features/Servers/UI/Layouts/UserLayout.razor | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Moonlight/Features/Servers/UI/Layouts/UserLayout.razor b/Moonlight/Features/Servers/UI/Layouts/UserLayout.razor index b7f3b712..905cfabc 100644 --- a/Moonlight/Features/Servers/UI/Layouts/UserLayout.razor +++ b/Moonlight/Features/Servers/UI/Layouts/UserLayout.razor @@ -131,6 +131,12 @@ We are unable to establish a connection to the server. Please refresh the page in order to retry. If this error persists please contact the support } + else if (IsNodeNotReady) + { + + The node this server is on is still booting. Please refresh the page in order to retry. If this error persists please contact the support + + } else { @@ -186,6 +192,7 @@ private bool IsInstalling = false; private bool IsConsoleDisconnected = false; private bool IsNodeOffline = false; + private bool IsNodeNotReady = false; private Timer UpdateTimer; @@ -254,6 +261,13 @@ } catch (WebSocketException e) { + if (e.Message.Contains("503")) + { + IsNodeNotReady = true; + await InvokeAsync(StateHasChanged); + return; + } + // We want to check if its an connection error, if yes we want to show the user that its an error with the connection // If not we proceed with the throwing for the soft error handler.