mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
gsocketclient: Track whether the connection attempt delay is reached
Just for debugging purposes, track whether the Connection Attempt Delay (https://datatracker.ietf.org/doc/html/rfc8305#section-8) has been reached for each attempt. This makes it a bit easier to diagnose `GSocketClient` problems in a debugger. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
ac6864ded7
commit
f5f418b057
@ -1542,6 +1542,7 @@ typedef struct
|
|||||||
GProxyAddress *proxy_addr;
|
GProxyAddress *proxy_addr;
|
||||||
GSocketClientAsyncConnectData *data; /* unowned */
|
GSocketClientAsyncConnectData *data; /* unowned */
|
||||||
GSource *delay_timeout_source; /* (owned) */
|
GSource *delay_timeout_source; /* (owned) */
|
||||||
|
gboolean delay_reached;
|
||||||
GCancellable *cancellable;
|
GCancellable *cancellable;
|
||||||
GCancellable *task_cancellable; /* (owned); this is equal to g_task_get_cancellable (ConnectionAttempt.data->task), but with a longer lifetime */
|
GCancellable *task_cancellable; /* (owned); this is equal to g_task_get_cancellable (ConnectionAttempt.data->task), but with a longer lifetime */
|
||||||
gulong cancelled_id;
|
gulong cancelled_id;
|
||||||
@ -1985,6 +1986,9 @@ on_connection_attempt_delay_reached (gpointer data)
|
|||||||
{
|
{
|
||||||
ConnectionAttempt *attempt = data;
|
ConnectionAttempt *attempt = data;
|
||||||
|
|
||||||
|
g_assert (!attempt->delay_reached);
|
||||||
|
attempt->delay_reached = TRUE;
|
||||||
|
|
||||||
if (!attempt->data->enumeration_completed)
|
if (!attempt->data->enumeration_completed)
|
||||||
{
|
{
|
||||||
g_debug ("GSocketClient: Connection attempt delay reached, trying another enumeration");
|
g_debug ("GSocketClient: Connection attempt delay reached, trying another enumeration");
|
||||||
|
Loading…
Reference in New Issue
Block a user