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
fixes OpenSSL error issue in ruby 1.9.3 #110
Conversation
That's interesting because I was getting the same error with Ruby 2. |
@bodrovis was the error intermittent? what version of 2.x were you using? |
@dustinleblanc It was constant until I double-checked enabled services. I used Ruby 2.0. |
if defined?(OpenSSL::SSL::SSLErrorWaitReadable) | ||
errors << OpenSSL::SSL::SSLErrorWaitReadable | ||
end | ||
errors | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bodrovis I'm sorry for not accepting this PR before, I think this is the correct way.
However, do you mind changing the condition to if RUBY_VERSION > '2'
? That's really the implicit requirement that we are making and that we are confirming in the tests. So I would like the method above to be:
def server_errors
[
OpenSSL::SSL::SSLError,
Errno::ETIMEDOUT,
Errno::ENETUNREACH,
Errno::ECONNRESET,
Net::HTTPServerError
] + (RUBY_VERSION < '2' ? [] : [OpenSSL::SSL::SSLErrorWaitReadable])
end
If you agree and change your commit to that, I will merge right away 👯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claudiofullscreen Yeah that looks better however this is not my PR :)
@dustinleblanc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooops 😹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making change and re-running specs in 1.9 + 2.0 just to confirm nothing goes boom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
On Thu, Apr 9, 2015 at 9:40 AM, Dustin LeBlanc notifications@github.com
wrote:
In lib/yt/request.rb
#110 (comment):Errno::ETIMEDOUT, Errno::ENETUNREACH, Errno::ECONNRESET, Net::HTTPServerError ]
# OpenSSL::SSL::SSLErrorWaitReadable does not exist in Ruby 1.9.3
if defined?(OpenSSL::SSL::SSLErrorWaitReadable)
errors << OpenSSL::SSL::SSLErrorWaitReadable
end
enderrors
Making change and re-running specs in 1.9 + 2.0 just to confirm nothing
goes boom—
Reply to this email directly or view it on GitHub
https://github.com/Fullscreen/yt/pull/110/files#r28078830.
Claudio Baccigalupo | Software Writer | Fullscreen, Inc.
http://Fullscreen.net | +1.310.202.3333
And… can you squash your two commits into one? Thanks again! |
NP, clearly my git-fu is getting rusty...too many |
btw confirmed specs passed in 1.9.3 and 2.2.1 |
fixes OpenSSL error issue in ruby 1.9.3
🎀 |
👍 |
Closes #103