aboutsummaryrefslogtreecommitdiff
path: root/src/util/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/client.c')
-rw-r--r--src/util/client.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/util/client.c b/src/util/client.c
index 163ae6eb9..3d74bff33 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -35,6 +35,15 @@
35 35
36#define LOG(kind,...) GNUNET_log_from (kind, "util-client",__VA_ARGS__) 36#define LOG(kind,...) GNUNET_log_from (kind, "util-client",__VA_ARGS__)
37 37
38/**
39 * Timeout we use on TCP connect before trying another
40 * result from the DNS resolver. Actual value used
41 * is this value divided by the number of address families.
42 * Default is 5s.
43 */
44#define CONNECT_RETRY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
45
46
38 47
39/** 48/**
40 * Internal state for a client connected to a GNUnet service. 49 * Internal state for a client connected to a GNUnet service.
@@ -656,7 +665,7 @@ try_connect_using_address (void *cls,
656 GNUNET_CONTAINER_DLL_insert (cstate->ap_head, 665 GNUNET_CONTAINER_DLL_insert (cstate->ap_head,
657 cstate->ap_tail, 666 cstate->ap_tail,
658 ap); 667 ap);
659 ap->task = GNUNET_SCHEDULER_add_write_net (GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT, 668 ap->task = GNUNET_SCHEDULER_add_write_net (CONNECT_RETRY_TIMEOUT,
660 ap->sock, 669 ap->sock,
661 &connect_probe_continuation, 670 &connect_probe_continuation,
662 ap); 671 ap);
@@ -760,7 +769,7 @@ start_connect (void *cls)
760 cstate->dns_active 769 cstate->dns_active
761 = GNUNET_RESOLVER_ip_get (cstate->hostname, 770 = GNUNET_RESOLVER_ip_get (cstate->hostname,
762 AF_UNSPEC, 771 AF_UNSPEC,
763 GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT, 772 CONNECT_RETRY_TIMEOUT,
764 &try_connect_using_address, 773 &try_connect_using_address,
765 cstate); 774 cstate);
766} 775}