Closed lesha1201 closed 2 years ago
This is supposed to happen, yes. It should only be done when the high level client is in use. See here for how it's done in my other library: https://github.com/altdesktop/python-dbus-next/blob/f97900e8568fef14fc5a16bcbd251f6f2f768bd4/dbus_next/message_bus.py#L958-L981
@acrisci Should we implement the same in this library?
Yeah, make sure you have a test.
We have a logic for updating the cached name owners https://github.com/dbusjs/node-dbus-next/blob/master/lib/bus.js#L104-L114
This logic only works, if the client were subscribed to
NameOwnerChanged
signal otherwise we don't get messages of this type. Because of this, when we aren't subscribed toNameOwnerChanged
, if we subscribe to signals of some DBus service and then this DBus service is restarted, we will have stale name owners andsender
of receiving signal won't match.I think we can add match for this signal by default (in bus.js) and move this logic to a signal handler. That way we will always have up-to-date name owners and make it tolerant to restarting of some dbus service that it uses.
I can implement it if the maintainers agree with this change.