From 741f6a3227339c120efc709a62720a55577d0a4d Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 Jan 2024 00:31:24 +0200 Subject: [PATCH] fix offline servers processing --- src/Controller/CrontabController.php | 5 +++++ src/Controller/MainController.php | 5 +++++ templates/default/main/index.html.twig | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Controller/CrontabController.php b/src/Controller/CrontabController.php index 7c580cb..d7dea17 100644 --- a/src/Controller/CrontabController.php +++ b/src/Controller/CrontabController.php @@ -224,6 +224,11 @@ class CrontabController extends AbstractController continue; } + catch (\Throwable $error) + { + continue; + } + finally { $server->Disconnect(); diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index 550db68..644bbc6 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -163,6 +163,11 @@ class MainController extends AbstractController continue; } + catch (\Throwable $error) + { + $status = false; + } + finally { $server->Disconnect(); diff --git a/templates/default/main/index.html.twig b/templates/default/main/index.html.twig index 59db429..1da7b80 100644 --- a/templates/default/main/index.html.twig +++ b/templates/default/main/index.html.twig @@ -48,13 +48,13 @@ {% block main_content %} {% for server in servers %}
- {% if server.info.HostName %} + {% if server.info.HostName is defined %}

{{ server.info.HostName }} [#{{ server.crc32server }}]

{% else %}

#{{ server.crc32server }}

{% endif %}
- {% if server.description.title %} + {% if server.description.title is defined %}
{{ server.description.title }}