If dbus-glib didn't indiscriminately connect to NameOwnerChanged, we could avoid waking up every time a process connects to or disconnects from the session bus, by using a less brute-force approach to monitoring the death of client processes in TpDynamicHandleRepo. Until #14183 is fixed, there's no point, though.
Note that installing a name-specific watch upon learning about the client connection has a race condition with the client falling off before the watch is effective. You may want to Ping the client after installing the watch, but that brings another bit of extra traffic in between useful messages. Sending the ping from an idle handler could be an optimization.
(In reply to comment #1) > You may want to Ping the client after installing the watch, but that brings > another bit of extra traffic in between useful messages. Sending the ping from > an idle handler could be an optimization. And of course, there is a method to get the current name owner.
Fixed in 0.7.35
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.