mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
gresolver: Add GResolver:timeout property
Without a timeout, some lookup requests can go on forever, typically due to bugs in underlying systems. This can have particularly significant effects on the Happy Eyeballs algorithm in `GSocketClient`, which relies on multiple name lookups as its first step. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2866
This commit is contained in:
@@ -277,6 +277,11 @@ GList *g_resolver_lookup_records_finish (GResolver
|
||||
GIO_AVAILABLE_IN_ALL
|
||||
void g_resolver_free_targets (GList *targets);
|
||||
|
||||
GIO_AVAILABLE_IN_2_78
|
||||
unsigned g_resolver_get_timeout (GResolver *resolver);
|
||||
GIO_AVAILABLE_IN_2_78
|
||||
void g_resolver_set_timeout (GResolver *resolver,
|
||||
unsigned timeout_ms);
|
||||
|
||||
/**
|
||||
* G_RESOLVER_ERROR:
|
||||
|
Reference in New Issue
Block a user