What does OpenSSL::SSL::SSLErrorWaitReadable "read would block" mean?
I get an OpenSSL::SSL::SSLErrorWaitReadable message with a read would block . I think this is due to timeouts, but I cannot find documentation on this.
Can someone help me figure out what causes this? Also, what can I do to prevent the problem?
The code that produces this error from time to time:
data = {hello: "world"} path = "https://example.com/api" uri = URI.parse(path) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = (uri.scheme == "https") http.verify_mode = OpenSSL::SSL::VERIFY_PEER request = Net::HTTP::Post.new(uri.request_uri) request.body = Oj.dump(data) request["Content-Type"] = "application/json" begin response = http.request(request)
I am using ruby ββversion 2.1.5p273 and openssl version 1.0.1i on osx 10.10.3 .
Versions are found using the ruby -v -ropenssl -rfiddle -e 'puts Fiddle::Function.new(Fiddle.dlopen(nil)["SSLeay_version"], [Fiddle::TYPE_INT], Fiddle::TYPE_VOIDP).call(0)' Thanks @bayendor
Automatico
source share