Skip to content

Non-blocking reads with configurable timeouts #167

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
Configure socket read timeouts
  • Loading branch information
mtodd committed Dec 1, 2014
commit 03e51554738fbf27b95865732bbc446e6f8f6315
4 changes: 4 additions & 0 deletions lib/net/ldap/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def initialize(server)
raise Net::LDAP::LdapError, "Connection to #{server[:host]} timed out."
end

if server[:timeout]
@conn.read_ber_timeout = server[:timeout]
end

if server[:encryption]
setup_encryption server[:encryption]
end
Expand Down