From dfe625edea5102a14546937792629907b4bd1ac1 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 8dca73c0..70d7b99c 100644
--- a/lib/net/ldap.rb
+++ b/lib/net/ldap.rb
@@ -556,6 +556,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
@@ -1343,6 +1344,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