From 582270849e846df106effc9101419b42acbc0bda Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Wed, 10 Jul 2024 15:40:52 +0200 Subject: [PATCH] Released 9.2.4 --- gui/lib/src/controller/backend_controller.dart | 18 +++++++++--------- gui/pubspec.yaml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gui/lib/src/controller/backend_controller.dart b/gui/lib/src/controller/backend_controller.dart index bacbe6d..6863376 100644 --- a/gui/lib/src/controller/backend_controller.dart +++ b/gui/lib/src/controller/backend_controller.dart @@ -105,16 +105,12 @@ class BackendController extends GetxController { return; } + final serverType = type.value; final hostData = this.host.text.trim(); final portData = this.port.text.trim(); - if(type() != ServerType.local) { - started.value = true; + started.value = true; + if(serverType != ServerType.local || portData != kDefaultBackendPort.toString()) { yield ServerResult(ServerResultType.starting); - }else { - started.value = false; - if(portData != kDefaultBackendPort.toString()) { - yield ServerResult(ServerResultType.starting); - } } if (hostData.isEmpty) { @@ -136,7 +132,7 @@ class BackendController extends GetxController { return; } - if ((type() != ServerType.local || portData != kDefaultBackendPort.toString()) && !(await isBackendPortFree())) { + if ((serverType != ServerType.local || portData != kDefaultBackendPort.toString()) && !(await isBackendPortFree())) { yield ServerResult(ServerResultType.freeingPort); final result = await freeBackendPort(); yield ServerResult(result ? ServerResultType.freePortSuccess : ServerResultType.freePortError); @@ -146,7 +142,7 @@ class BackendController extends GetxController { } } - switch(type()){ + switch(serverType){ case ServerType.embedded: final process = await startEmbeddedBackend(detached.value); embeddedProcessPid = process.pid; @@ -173,6 +169,10 @@ class BackendController extends GetxController { } localServer = await startRemoteBackendProxy(Uri.parse("http://$kDefaultBackendHost:$portData")); + }else { + // If the local server is running on port 3551 there is no reverse proxy running + // We only need to check if everything is working + started.value = false; } break; diff --git a/gui/pubspec.yaml b/gui/pubspec.yaml index c858e2d..47cdaf7 100644 --- a/gui/pubspec.yaml +++ b/gui/pubspec.yaml @@ -1,6 +1,6 @@ name: reboot_launcher description: Graphical User Interface for Project Reboot -version: "9.2.3" +version: "9.2.4" publish_to: 'none'