mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-31 22:23:39 +02:00
GSocketClient: improve error messages on connection failure
Include the hostname (or proxy hostname if it was the connection to the proxy server that failed) in the GError message when g_socket_client_connect* fail. https://bugzilla.gnome.org/show_bug.cgi?id=661266
This commit is contained in:
@@ -1682,7 +1682,6 @@ g_socket_connect (GSocket *socket,
|
||||
if (g_socket_check_connect_result (socket, error))
|
||||
break;
|
||||
}
|
||||
g_prefix_error (error, _("Error connecting: "));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1692,9 +1691,9 @@ g_socket_connect (GSocket *socket,
|
||||
}
|
||||
}
|
||||
else
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
socket_io_error_from_errno (errsv),
|
||||
_("Error connecting: %s"), socket_strerror (errsv));
|
||||
g_set_error_literal (error, G_IO_ERROR,
|
||||
socket_io_error_from_errno (errsv),
|
||||
socket_strerror (errsv));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user