GSocketClient - Free last error if a connection attempt fails and on retry the cancellable is cancelled

This commit is contained in:
Sebastian Dröge 2019-03-12 10:32:56 +01:00
parent 1a03ebc43a
commit 499c201472

View File

@ -1006,6 +1006,7 @@ g_socket_client_connect (GSocketClient *client,
if (g_cancellable_is_cancelled (cancellable)) if (g_cancellable_is_cancelled (cancellable))
{ {
g_clear_error (error); g_clear_error (error);
g_clear_error (&last_error);
g_cancellable_set_error_if_cancelled (cancellable, error); g_cancellable_set_error_if_cancelled (cancellable, error);
break; break;
} }