mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 22:52:09 +01:00
gsocketclient: fix crash when async connection step fails
This is a regression from !1686. The tmp_error is no longer valid after it is "considered" and cannot be used at this point. We should print the error earlier instead. Fixes #2233
This commit is contained in:
parent
35ffbf953d
commit
c2b8fa8a34
@ -1837,9 +1837,9 @@ g_socket_client_connected_callback (GObject *source,
|
|||||||
{
|
{
|
||||||
if (!g_cancellable_is_cancelled (attempt->cancellable))
|
if (!g_cancellable_is_cancelled (attempt->cancellable))
|
||||||
{
|
{
|
||||||
|
g_debug ("GSocketClient: Connection attempt failed: %s", data->error_info->tmp_error->message);
|
||||||
clarify_connect_error (data->error_info->tmp_error, data->connectable, attempt->address);
|
clarify_connect_error (data->error_info->tmp_error, data->connectable, attempt->address);
|
||||||
consider_tmp_error (data->error_info, G_SOCKET_CLIENT_CONNECTING);
|
consider_tmp_error (data->error_info, G_SOCKET_CLIENT_CONNECTING);
|
||||||
g_debug ("GSocketClient: Connection attempt failed: %s", data->error_info->tmp_error->message);
|
|
||||||
connection_attempt_remove (attempt);
|
connection_attempt_remove (attempt);
|
||||||
connection_attempt_unref (attempt);
|
connection_attempt_unref (attempt);
|
||||||
try_next_connection_or_finish (data, FALSE);
|
try_next_connection_or_finish (data, FALSE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user