After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753839 - gdbus: don't warn when returning a value on a closed connection
gdbus: don't warn when returning a value on a closed connection
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other All
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-08-19 17:55 UTC by Dan Winship
Modified: 2015-08-19 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdbus: don't warn when returning a value on a closed connection (1.91 KB, patch)
2015-08-19 17:55 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2015-08-19 17:55:50 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.
Comment 1 Dan Winship 2015-08-19 17:55:55 UTC
Created attachment 309624 [details] [review]
gdbus: don't warn when returning a value on a closed connection
Comment 2 Matthias Clasen 2015-08-19 20:05:29 UTC
Review of attachment 309624 [details] [review]:

Looks good to me
Comment 3 Dan Winship 2015-08-19 20:09:14 UTC
Attachment 309624 [details] pushed as c686245 - gdbus: don't warn when returning a value on a closed connection