sd-event: change ordering of pending/ratelimited events
authorLennart Poettering <lennart@poettering.net>
Tue, 8 Jun 2021 07:07:51 +0000 (00:07 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 12 Jul 2021 11:30:53 +0000 (13:30 +0200)
commitb1699fd2e0614c51bc08df49aad0b6e5f56eea68
tree83e23f2609799ee42261d9f7ced4a1fca5ce6a19
parent9f7274055762c8ab31248489e7236c1a51154f62
sd-event: change ordering of pending/ratelimited events

Instead of ordering non-pending before pending we should order
"non-pending OR ratelimited" before "pending AND not-ratelimited".
This fixes a bug where ratelimited events were ordered at the end of the
priority queue and could be stuck there for an indeterminate amount of
time.

(cherry picked from commit 81107b8419c39f726fd2805517a5b9faab204e59)
src/libsystemd/sd-event/sd-event.c