Skip to content

Commit 03e5155

Browse files
committed
Configure socket read timeouts
1 parent 3366bda commit 03e5155

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/net/ldap/connection.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ def initialize(server)
2121
raise Net::LDAP::LdapError, "Connection to #{server[:host]} timed out."
2222
end
2323

24+
if server[:timeout]
25+
@conn.read_ber_timeout = server[:timeout]
26+
end
27+
2428
if server[:encryption]
2529
setup_encryption server[:encryption]
2630
end

0 commit comments

Comments
 (0)