summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/login/logind-dbus.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 210e754809..5162cdf875 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -1456,8 +1456,11 @@ static int execute_shutdown_or_sleep(
if (r < 0)
return r;
- /* And we're back. */
- send_prepare_for(m, w, false);
+ if (w == INHIBIT_SLEEP)
+ /* And we're back. */
+ send_prepare_for(m, w, false);
+
+ m->action_what = 0;
/* Make sure the lid switch is ignored for a while (?) */
manager_set_lid_switch_ignore(m, now(CLOCK_MONOTONIC) + m->holdoff_timeout_usec);