lib/adauth/connection.rb in adauth-2.0.0 vs lib/adauth/connection.rb in adauth-2.0.1
- old
+ new
@@ -30,9 +30,15 @@
raise 'Query User Rejected'
end
}
rescue Timeout::Error
raise 'Unable to connect to LDAP Server'
+ rescue Errno::ECONNRESET
+ if @config[:allow_fallback]
+ @config[:port] = @config[:allow_fallback]
+ @config[:encryption] = false
+ return Adauth::Connection.new(@config).bind
+ end
end
end
end
end
\ No newline at end of file