ReconnectLDAPObject doesn't reconnect after main failure

Michael Ströder michael at stroeder.com
Sat Jan 27 02:00:56 CET 2007


Alain Spineux wrote:
> 
> The problem is the failed statement has initiated a new connection
> (when the server is down)
> calling initialize (that doesn't fail) and bind that fail but is in a
> try: except:  block in ReconnectLDAPObject.reconnect() !
> Then the server restart and the next statement get advantages of the
> work done initialize

Yes. Inspired by you mentioning libldap I remembered that unbind_s()
should be called when handling ldap.SERVER_DOWN exception to completely
drop the whole connection context.

Please test the version I've committed some minutes ago.
Thanks again.

Ciao, Michael.



More information about the python-ldap mailing list