mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +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;
|
||||
GSocketClientAsyncConnectData *data; /* unowned */
|
||||
GSource *delay_timeout_source; /* (owned) */
|
||||
gboolean delay_reached;
|
||||
GCancellable *cancellable;
|
||||
GCancellable *task_cancellable; /* (owned); this is equal to g_task_get_cancellable (ConnectionAttempt.data->task), but with a longer lifetime */
|
||||
gulong cancelled_id;
|
||||
@ -1985,6 +1986,9 @@ on_connection_attempt_delay_reached (gpointer data)
|
||||
{
|
||||
ConnectionAttempt *attempt = data;
|
||||
|
||||
g_assert (!attempt->delay_reached);
|
||||
attempt->delay_reached = TRUE;
|
||||
|
||||
if (!attempt->data->enumeration_completed)
|
||||
{
|
||||
g_debug ("GSocketClient: Connection attempt delay reached, trying another enumeration");
|
||||
|
Loading…
Reference in New Issue
Block a user