summaryrefslogtreecommitdiff
path: root/hostport.c
diff options
context:
space:
mode:
authorvenaas <venaas>2009-02-05 10:09:14 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2009-02-05 10:09:14 +0000
commitd7b5499013188ddc78f2b770cce78543b3b7c48c (patch)
tree1139d0482f53ee32a461cdc9658b88f1b03420f6 /hostport.c
parent3c0a3e22536d009f3d4cc1faa37007058f51431b (diff)
timeout for connect
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@467 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'hostport.c')
-rw-r--r--hostport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hostport.c b/hostport.c
index 238af0e..22ff2dc 100644
--- a/hostport.c
+++ b/hostport.c
@@ -285,7 +285,7 @@ int connecttcphostlist(struct list *hostports, struct addrinfo *src) {
for (entry = list_first(hostports); entry; entry = list_next(entry)) {
hp = (struct hostportres *)entry->data;
debug(DBG_WARN, "connecttcphostlist: trying to open TCP connection to %s port %s", hp->host, hp->port);
- if ((s = connecttcp(hp->addrinfo, src)) >= 0) {
+ if ((s = connecttcp(hp->addrinfo, src, list_count(hostports) > 1 ? 5 : 30)) >= 0) {
debug(DBG_WARN, "connecttcphostlist: TCP connection to %s port %s up", hp->host, hp->port);
return s;
}