From b8b9042d6d546fed903e7f10f5cf0a4daa366e50 Mon Sep 17 00:00:00 2001 From: Dhivya Dandapani Date: Fri, 15 May 2020 09:23:12 +0530 Subject: [PATCH] Ability to add socket_class while instantiating net_ldap connection --- lib/net/ldap.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/net/ldap.rb b/lib/net/ldap.rb index 9c13a97d..cbb5a64f 100644 --- a/lib/net/ldap.rb +++ b/lib/net/ldap.rb @@ -553,6 +553,7 @@ def initialize(args = {}) @force_no_page = args[:force_no_page] || DefaultForceNoPage @encryption = normalize_encryption(args[:encryption]) # may be nil @connect_timeout = args[:connect_timeout] + @socket_class = args[:socket_class] if pr = @auth[:password] and pr.respond_to?(:call) @auth[:password] = pr.call @@ -1315,6 +1316,7 @@ def new_connection :hosts => @hosts, :encryption => @encryption, :instrumentation_service => @instrumentation_service, + :socket_class => @socket_class, :connect_timeout => @connect_timeout # Force connect to see if there's a connection error