Answer the question
In order to leave comments, you need to log in
EventMachine HTTPS connection closed who faced?
Similar issue as here https://github.com/igrigorik/em-http-request/issues/286
EM.synchrony do
EM::Synchrony::FiberIterator.new(['https://a-ads.com/', 'https://www.weusecoins.com/en/get-free-bitcoins/'], 10).each do |url|
resp = EventMachine::HttpRequest.new(url, :ssl => { :verify_peer => false }, :connect_timeout => 10, :inactivity_timeout => 10).get(:redirects => 10, :keepalive => true, :head => {'User-Agent' => 'Ruby', 'Accept' => '*/*'})
resp.callback { puts "#{url}: ok" }
resp.errback { puts "#{url}: error"}
end
EventMachine.stop
end
# https://www.weusecoins.com/en/get-free-bitcoins/: error
# https://a-ads.com/: ok
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question