diff --git a/main.cpp b/main.cpp
index c294a13..3b76870 100644
--- a/main.cpp
+++ b/main.cpp
@@ -36,6 +36,7 @@
 #include <sdeventplus/source/event.hpp>
 #include <sdeventplus/source/io.hpp>
 #include <sdeventplus/source/signal.hpp>
+#include <sdeventplus/utility/sdbus.hpp>
 #include <span>
 #include <stdplus/signal.hpp>
 #include <thread>
@@ -342,30 +343,16 @@
                 std::bind_front(PostCodeEventHandler, &reporter, verbose));
         }
         // Enable bus to handle incoming IO and bus events
-        bool done = false;
-        bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
-        auto intCb = [&done](sdeventplus::source::Signal& source,
-                             const struct signalfd_siginfo*) {
+        auto intCb = [](sdeventplus::source::Signal& source,
+                        const struct signalfd_siginfo*) {
             source.get_event().exit(0);
-            done = true;
         };
         stdplus::signal::block(SIGINT);
         sdeventplus::source::Signal(event, SIGINT, intCb).set_floating(true);
         stdplus::signal::block(SIGTERM);
         sdeventplus::source::Signal(event, SIGTERM, std::move(intCb))
             .set_floating(true);
-
-        while (!done)
-        {
-            // Process all outstanding bus events before running the loop.
-            // This prevents the sd-bus handling logic from leaking memory.
-            // TODO: Remove when upstream fixes this bug
-            while (bus.process_discard() > 0)
-                ;
-
-            // Run and never timeout
-            event.run(std::nullopt);
-        }
+        return sdeventplus::utility::loopWithBus(event, bus);
     }
     catch (const std::exception& e)
     {
