Do not die if LDAP is not available on connect.

This commit is contained in:
Martin Edenhofer 2013-02-10 22:39:26 +01:00
parent b79a4dc2cd
commit 03f7172e3d

View file

@ -16,8 +16,13 @@ module Auth::LDAP
end end
# ldap bind # ldap bind
if !ldap.bind begin
puts "NOTICE: Can't connect/bind to '#{host}', #{ldap.get_operation_result.code}, #{ldap.get_operation_result.message}" if !ldap.bind
puts "NOTICE: Can't bind to '#{config[:host]}', #{ldap.get_operation_result.code}, #{ldap.get_operation_result.message}"
return
end
rescue Exception => e
puts "NOTICE: Can't connect to '#{config[:host]}', #{e.to_s}"
return return
end end