From f4ca8c52cc53e4d4d5377941c68d705a24084028 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 13 Mar 2026 22:39:25 +0100 Subject: [PATCH] core (main): ensure that reactor is running during post initialisation: In background mode, the reactor is run later, this may cause troubles during some initialisation. This has notably be seen for PB bridge which was not correctly listening to the socket. --- libervia/backend/core/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libervia/backend/core/main.py b/libervia/backend/core/main.py index 7da6aeca..c77b9129 100644 --- a/libervia/backend/core/main.py +++ b/libervia/backend/core/main.py @@ -105,7 +105,10 @@ class LiberviaBackend(service.Service): else: self.local_shared_path = None - defer.ensureDeferred(self._post_init()) + # XXX: we use callLater here to be sure that the reactor is running when doing + # post initialisation. This is notably important in background mode where + # reactor is run later. + reactor.callLater(0, lambda: defer.ensureDeferred(self._post_init())) @property def version(self):