Open
Description
Originally submitted on RubyForge by James Hewitt as #23425 on 2009-01-03:
I'd like to be able to leave an LDAP connection open.
I know the library doesn't want me to, but I would like to be able to decide what to do with my own network connections.
In some cases, leaving the ldap connection open makes writing my application a lot easier, for example, where I want to only use one ldap connection for each request to a rails app, but don't want to have to wrap the whole request in an LDAP.open. Or even to have an ldap connection pool, as you would a mysql connection pool.
I would suggest:
- Altering LDAP.open to open the connection and leave it open if a block is not given.
- Adding a close method to close connections.