libervia-backend/libervia/backend/tools
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Goffi 2c5713b486 memory (disco): Fix pending queries isolation and cancellation:
When returning pending queries `Deferred`, a caller could add its own callbacks/errbacks
and modify the result. When another caller was reusing the `Deferred`, it got the modified
result (which could be `None`) instead of the expected `DiscoInfo`.

This has been fixed by creating and new `Deferred` on each request, and chaining it to the
original pending queries using the new `fork_deferred` helper method, so each caller get
its own isolated `Deferred`.

In `fork_deferred`, `cancel` method is used to call the parent Deferred `cancel`, to avoid
a wrong Exception propagation and the chained Deferred to be eventually called twice
(triggering `AlreadyCalledError`).

`cleanup_query` has been moved above `infos_cb` callback, as it should be the first
callback called.
2026-05-14 11:43:59 +02:00
..
common Dates update. 2026-03-31 12:57:17 +02:00
__init__.py refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
async_trigger.py Dates update. 2026-03-31 12:57:17 +02:00
config.py Dates update. 2026-03-31 12:57:17 +02:00
image.py Dates update. 2026-03-31 12:57:17 +02:00
sat_defer.py Dates update. 2026-03-31 12:57:17 +02:00
stream.py Dates update. 2026-03-31 12:57:17 +02:00
trigger.py tools (trigger): Type hint + dead code removal: 2026-05-04 15:08:13 +02:00
utils.py memory (disco): Fix pending queries isolation and cancellation: 2026-05-14 11:43:59 +02:00
video.py Dates update. 2026-03-31 12:57:17 +02:00
web.py Dates update. 2026-03-31 12:57:17 +02:00
xml_tools.py plugin XEP-0355: Namespace Delegation implementation: 2026-04-14 23:04:04 +02:00
xmpp_datetime.py Dates update. 2026-03-31 12:57:17 +02:00