summaryrefslogtreecommitdiff
path: root/src/login/logind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind.c')
-rw-r--r--src/login/logind.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index 554409926a..2add241066 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -889,10 +889,11 @@ void manager_gc(Manager *m, bool drop_not_started) {
LIST_REMOVE(gc_queue, m->user_gc_queue, user);
user->in_gc_queue = false;
- if (!user_check_gc(user, drop_not_started) &&
- user_get_state(user) != USER_CLOSING)
+ /* First step: queue stop jobs */
+ if (!user_check_gc(user, drop_not_started))
user_stop(user, false);
+ /* Second step: finalize user */
if (!user_check_gc(user, drop_not_started)) {
user_finalize(user);
user_free(user);