Skip to content

Respect connect_timeout when establishing SSL connections #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 13, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use ETIMEDOUT for openssl timeouts
  • Loading branch information
tmm1 committed Jun 17, 2016
commit 749c22b4e5514ead10c92bcaec1c5a1eb49db455
4 changes: 2 additions & 2 deletions lib/net/ldap/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ def self.wrap_with_ssl(io, tls_options = {}, timeout=nil)
if IO.select([conn], nil, nil, timeout)
retry
else
raise Net::LDAP::SocketError, "OpenSSL connection read timeout"
raise Errno::ETIMEDOUT, "OpenSSL connection read timeout"
end
rescue IO::WaitWritable
if IO.select(nil, [conn], nil, timeout)
retry
else
raise Net::LDAP::SocketError, "OpenSSL connection write timeout"
raise Errno::ETIMEDOUT, "OpenSSL connection write timeout"
end
end

Expand Down