mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
GDBus: If exiting b/c remote peer disconnected and error is set, print it
This should make things easier to debug: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting. Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
parent
3940cc9a11
commit
6a492a4519
@ -552,8 +552,18 @@ g_dbus_connection_real_closed (GDBusConnection *connection,
|
||||
GError *error)
|
||||
{
|
||||
if (remote_peer_vanished && connection->exit_on_close)
|
||||
{
|
||||
if (error != NULL)
|
||||
{
|
||||
g_print ("%s: Remote peer vanished with error: %s (%s, %d). Exiting.\n",
|
||||
G_STRFUNC,
|
||||
error->message,
|
||||
g_quark_to_string (error->domain), error->code);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_print ("%s: Remote peer vanished. Exiting.\n", G_STRFUNC);
|
||||
}
|
||||
raise (SIGTERM);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user