From 0c062994071d861a12181555617f83c32eb27a14 Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Wed, 17 May 2017 07:56:39 +0200 Subject: [PATCH] Reset pending actions after returning from possible suspend/sleep actions. This should fix any "suspension loops". --- src/login/logind-dbus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 209e62b67..82ab09be1 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1532,6 +1532,10 @@ static int execute_shutdown_or_sleep( "ss", NULL, "replace-irreversibly"); #else r = shutdown_or_sleep(m, action); + + /* no more pending actions, whether this failed or not */ + m->pending_action = HANDLE_IGNORE; + m->action_what = 0; #endif // 0 if (r < 0) return r; -- 2.30.2