Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query name owners just once #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mardy
Copy link

@mardy mardy commented Mar 28, 2024

Since all clients connecting to the proxy share the same policy filters, we can setup the name owner data just once, when the first client connects, and store it in the FlatpakProxy object so that all other clients can use it.

This avoid duplicating the calls to ListNames and GetNameOwner.

Fixes: #55

Note: this works in my setup, but I wonder if I should call stop_reading() at the end of got_buffer_from_client() when the name_owners_state is NAME_OWNERS_WAITING and reinstate the reading once the state reaches NAME_OWNERS_READY; the comment on this invocation of stop_reading() seems to hint that we are just worried about the ordering of the serial numbers, so it should be fine like this, but I'm not sure.

Since all clients connecting to the proxy share the same policy filters,
we can setup the name owner data just once, when the first client
connects, and store it in the FlatpakProxy object so that all other
clients can use it.

This avoid duplicating the calls to ListNames and GetNameOwner.

Fixes: flatpak#55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Service name tracking is setup multiple times
1 participant