feat(network): replace polling with D-Bus signal subscription#191
Merged
JanZachmann merged 5 commits intoomnect:mainfrom Feb 24, 2026
Merged
Conversation
e47220e to
5b6d42f
Compare
Subscribe to org.freedesktop.network1 signals via zbus::MessageStream instead of polling networkd every 60 seconds. A 2-second debounce window coalesces bursts (e.g. DHCP negotiation) into a single report call. The background task self-terminates when the receiver is dropped on shutdown, and is also aborted when Network is dropped via the stored JoinHandle. Mock path retains the interval-based approach unchanged. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
With D-Bus signal subscription the delay after ReloadNetwork is no longer needed: networkd emits PropertiesChanged signals as it applies the new config, which triggers a debounced report automatically. Also remove the RELOAD_NETWORK_DELAY_MS env var and update README. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
…ments Remove redundant "network:" prefix from signal task log messages to match the function-context style used elsewhere in this module. Add comments explaining the debounce rationale and the FAR_FUTURE placeholder required by tokio::select!'s unconditional future evaluation. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
5b6d42f to
f9e0304
Compare
mlilien
approved these changes
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
org.freedesktop.network1D-Bus signals viazbus::MessageStream::for_match_ruleinstead of pollingnetworkd_interfaces()every 60 secondsreport()callRELOAD_NETWORK_DELAY_MS) — signals fired by networkd as it applies config changes make it redundant