From: <mi...@st...> - 2003-03-04 18:30:31
|
Jerry Lee wrote: > Michael Str=F6der wrote: >> Jerry Lee wrote: >>> >>> I recently posted to the list about a problem I am having with bind=20 >>> blocking for a long time before it times out if the server isn't ther= e. >> >> You can elaborate on "the server isn't there"? >=20 > The machine doesn't exist - an ip address that I can't ping. I think it depends whether and which ICMP response your LDAP client recei= ves=20 in this case. > How do I set the TIMEOUT values with set_option. > Could you give me an example of how to set OPT_TIMEOUT and=20 > OPT_NETWORK_TIMEOUT to 10 secs?? >>> l.set_option(ldap.OPT_TIMELIMIT,60.0) >>> l.get_option(ldap.OPT_TIMELIMIT) 60 > Is the synchronous/asynchronous nature of the call controlled in the=20 > python-ldap module or is it a function of the OpenLDAP libs?? It's controlled in the OpenLDAP libs. Updating OpenLDAP could be a good i= dea. My attempt to implement a result() method which controls the timeout was = a=20 CPU hog. Ciao, Michael. |