GNOME Bugzilla – Bug 753839
gdbus: don't warn when returning a value on a closed connection
Last modified: 2015-08-19 20:09:17 UTC
g_dbus_method_invocation_return_value(), etc, don't have GError parameters (which makes sense since they won't usually return errors, and there's not much you could do if they did), so in the rare case when something does go wrong, they print a warning. However, there is at least one situation where the warning is a bad idea: if you are using private bus connections, and a client connects, makes a request, and then disconnects before getting the response. Given that there's nothing the caller can do to prevent this case from getting hit (since the client might not disconnect until after the call to g_dbus_method_invocation_return_value() starts) and given that the server can never actually know for sure that the client has received the response (it might disconnect after reading the response but before, but before processing it), just kill the warning in this case.
Created attachment 309624 [details] [review] gdbus: don't warn when returning a value on a closed connection
Review of attachment 309624 [details] [review]: Looks good to me
Attachment 309624 [details] pushed as c686245 - gdbus: don't warn when returning a value on a closed connection