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

DBus.getBus() Can Only Be Called Once #240

Open
bkeller7777 opened this issue Jul 13, 2022 · 0 comments
Open

DBus.getBus() Can Only Be Called Once #240

bkeller7777 opened this issue Jul 13, 2022 · 0 comments

Comments

@bkeller7777
Copy link

I wanted to add a DBus.getBus('session').getInterface() retry mechanism such that if a call to getInterface() fails it would periodically retry. I found that in my initial implementation if getInterface() failed once (with Error: No introspectable) that it would always fail, even if the interface in question was instantiated later on. In my initial implementation I would call DBus.getBus('session') every attempt to get the interface. I was able to get around this issue by only calling DBus.getBus('session') once in my application. Afterwards, getInterface() would succeed on a retry attempt after it previously failed once the external interface was instantiated.

I have also found that this issue of only being able to execute DBus.getBus() once limits you to only be able to call DBus.getBus() OR DBus.registerService() once; you can only call one or the other in your application. The reason I think is because DBus.getBus() is called within DBus.registerService(). So the only way I've found to be able to create an interface and acquire an interface within the same application is if you launch one or the other within a child process.

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

No branches or pull requests

1 participant