K
K
kkrieger2015-07-31 15:50:43
ruby
kkrieger, 2015-07-31 15:50:43

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

who has already decided?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question