From aacbadc14e8b56b1854d6d5e3c0bf00f9b10d5bd Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 26 Apr 2008 13:48:14 +0000 Subject: increase time out values because now nslcd will error out more quickly if the LDAP server is known to be unavailable git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@708 ef36b2f9-881f-0410-afb5-c4e39611909c --- man/nss-ldapd.conf.5.xml | 4 ++-- nss/common.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/man/nss-ldapd.conf.5.xml b/man/nss-ldapd.conf.5.xml index e3ffad9..f8fd6c2 100644 --- a/man/nss-ldapd.conf.5.xml +++ b/man/nss-ldapd.conf.5.xml @@ -390,8 +390,8 @@ is used between nslcd and the LDAP server. The mechanism between the NSS client library and nslcd is simpler with a fixed compiled-in - time out of a 1.5 seconds for writing to nslcd and - a time out of 2 seconds for reading answers. + time out of a 10 seconds for writing to nslcd and + a time out of 20 seconds for reading answers. nslcd itself has a read time out of 0.5 seconds and a write time out of 5 seconds. diff --git a/nss/common.c b/nss/common.c index 4466f1a..223cbfa 100644 --- a/nss/common.c +++ b/nss/common.c @@ -68,10 +68,10 @@ TFILE *nslcd_client_open() return NULL; } /* set the timeouts */ - readtimeout.tv_sec=2; /* looking up stuff may take some time */ + readtimeout.tv_sec=20; /* looking up stuff may take some time */ readtimeout.tv_usec=0; - writetimeout.tv_sec=1; /* nslcd could be loaded with requests */ - writetimeout.tv_usec=500000; + writetimeout.tv_sec=10; /* nslcd could be loaded with requests */ + writetimeout.tv_usec=0; /* create a stream object */ if ((fp=tio_fdopen(sock,&readtimeout,&writetimeout, READBUFFER_MINSIZE,READBUFFER_MAXSIZE, -- cgit v1.2.3