From 1fb2b8efd5a1e4ab861f1b0f8e0bde7ad578b8ef Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Wed, 5 Jul 2023 17:38:53 +0000 Subject: [PATCH] fix(util): don't abort modules from SleeperThread after 3c9cbc99d736 [warning] module sway/workspaces: Disabling module "sway/workspaces", Unable to connect to the SYSTEM Bus!... [warning] module sway/mode: Disabling module "sway/mode", Unable to connect to the SYSTEM Bus!... [warning] module sway/scratchpad: Disabling module "sway/scratchpad", Unable to connect to the SYSTEM Bus!... [warning] module custom/media: Disabling module "custom/media", Unable to connect to the SYSTEM Bus!... [warning] module sway/window: Disabling module "sway/window", Unable to connect to the SYSTEM Bus!... [warning] module cpu: Disabling module "cpu", Unable to connect to the SYSTEM Bus!... [warning] module memory: Disabling module "memory", Unable to connect to the SYSTEM Bus!... [warning] module temperature: Disabling module "temperature", Unable to connect to the SYSTEM Bus!... [warning] module sway/language: Disabling module "sway/language", Unable to connect to the SYSTEM Bus!... [warning] module battery: Disabling module "battery", Unable to connect to the SYSTEM Bus!... [warning] module battery#bat2: Disabling module "battery#bat2", Unable to connect to the SYSTEM Bus!... --- src/util/prepare_for_sleep.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/prepare_for_sleep.cpp b/src/util/prepare_for_sleep.cpp index 221497e8..218c1e29 100644 --- a/src/util/prepare_for_sleep.cpp +++ b/src/util/prepare_for_sleep.cpp @@ -1,6 +1,7 @@ #include "util/prepare_for_sleep.h" #include +#include namespace { class PrepareForSleep { @@ -9,7 +10,7 @@ class PrepareForSleep { GError *error = NULL; login1_connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if (!login1_connection) { - throw std::runtime_error("Unable to connect to the SYSTEM Bus!..."); + spdlog::warn("Unable to connect to the SYSTEM Bus!..."); } else { login1_id = g_dbus_connection_signal_subscribe( login1_connection, "org.freedesktop.login1", "org.freedesktop.login1.Manager",