On Sat 12 Mar 2005 at 08:16:12 +0900, Ian Macdonald wrote:

> Perhaps Net::LDAP remembers the details of the connection when it was
> opened and silently performs another open when you perform a bind after
> an unbind, but at some point, you're still opening a new connection.
> It's just a question of whether it's implicit or explicit.
> 
> Ruby/LDAP could be made to do this, too, I think. The details passed to
> LDAP::Conn.new could be put into instance variables. If the connection
> is dead at bind time, these could be read and used to transparently
> reestablish the connection before conducting the bind.
> 
> I'll look at how hard this would be to ship up in practice.

This feature is now in Ruby/LDAP's CVS and will be released in 0.9.1.

This allows you to perform an LDAP::Conn#unbind, followed by either an
LDAP::Conn#bind or an LDAP::Conn#simple_bind to reconnect to the server,
using different credentials if you wish.

Ian
-- 
Ian Macdonald               | This generation doesn't have emotional
System Administrator        | baggage.  We have emotional moving vans.   
ian / caliban.org             | -- Bruce Feirstein 
http://www.caliban.org      | 
                            |