Skip to content
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

Net::LDAP::ConnectionError swallows Errno::ETIMEDOUT #354

Open
davispuh opened this issue May 8, 2020 · 2 comments
Open

Net::LDAP::ConnectionError swallows Errno::ETIMEDOUT #354

davispuh opened this issue May 8, 2020 · 2 comments

Comments

@davispuh
Copy link

davispuh commented May 8, 2020

Currently if SSL timeout occurs then Errno::ETIMEDOUT will be raised in wrap_with_ssl but later in open_connection it will be caught and created as Net::LDAP::ConnectionError.
But Net::LDAP::ConnectionError will lose all information about it and it can only be caught as Net::LDAP::Error which covers pretty much everything.

So currently to retry temporary issues (ie. timeout) you have to compare Net::LDAP::Error message with "Connection timed out - OpenSSL connection read timeout" for this.

I think Net::LDAP::ConnectionError should do same for Errno::ETIMEDOUT as it does for Errno::ECONNREFUSED

@HarlemSquirrel
Copy link
Member

It doesn't look like Errno::ETIMEDOUT is one of the rescued errors here.

rescue Net::LDAP::Error, SocketError, SystemCallError,
OpenSSL::SSL::SSLError => e

@davispuh
Copy link
Author

SystemCallError is base class for Errno exceptions that's why they get rescued here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants