Skip to content

Commit 21ffe8f

Browse files
committed
use Net::LDAP::SocketError on openssl timeouts
1 parent 8ba4796 commit 21ffe8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/net/ldap/connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ def self.wrap_with_ssl(io, tls_options = {}, timeout=nil)
9898
if IO.select([conn], nil, nil, timeout)
9999
retry
100100
else
101-
raise Net::LDAP::LdapError, "OpenSSL connection read timeout"
101+
raise Net::LDAP::SocketError, "OpenSSL connection read timeout"
102102
end
103103
rescue IO::WaitWritable
104104
if IO.select(nil, [conn], nil, timeout)
105105
retry
106106
else
107-
raise Net::LDAP::LdapError, "OpenSSL connection write timeout"
107+
raise Net::LDAP::SocketError, "OpenSSL connection write timeout"
108108
end
109109
end
110110

0 commit comments

Comments
 (0)