{"action":"created","issue":{"url":"https://api.github.com/repos/excon/excon/issues/487","labels_url":"https://api.github.com/repos/excon/excon/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/excon/excon/issues/487/comments","events_url":"https://api.github.com/repos/excon/excon/issues/487/events","html_url":"https://github.com/excon/excon/pull/487","id":63835740,"number":487,"title":"Use the proper IO.select with a connect timeout for SSL sockets","user":{"login":"zanker","id":323517,"avatar_url":"https://avatars.githubusercontent.com/u/323517?v=3","gravatar_id":"","url":"https://api.github.com/users/zanker","html_url":"https://github.com/zanker","followers_url":"https://api.github.com/users/zanker/followers","following_url":"https://api.github.com/users/zanker/following{/other_user}","gists_url":"https://api.github.com/users/zanker/gists{/gist_id}","starred_url":"https://api.github.com/users/zanker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanker/subscriptions","organizations_url":"https://api.github.com/users/zanker/orgs","repos_url":"https://api.github.com/users/zanker/repos","events_url":"https://api.github.com/users/zanker/events{/privacy}","received_events_url":"https://api.github.com/users/zanker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-23T21:21:37Z","updated_at":"2015-03-26T15:49:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/excon/excon/pulls/487","html_url":"https://github.com/excon/excon/pull/487","diff_url":"https://github.com/excon/excon/pull/487.diff","patch_url":"https://github.com/excon/excon/pull/487.patch"},"body":"I don't have a good test case that lets someone else replicate this. One of our apps is getting SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A. Net::HTTP works fine with the same certs, another app works fine with the same OpenSSL/Ruby/Excon version.\r\n\r\nFor some reason one app gets those errors with Excon, I narrowed it down to the fact that Excon is repeatedly calling connect_nonblock and using a raise to \"block\". As soon as I switch it to the proper method of using IO.select it works fine.\r\n\r\nGiven that connect_nonblock can be called 10s/100s of times, that makes this raise quite a lot which is really inefficient, especially on JRuby.\r\n\r\nAlso I can't see a reason to do it that way at this point, because non-SSL uses `IO.select` anyway."},"comment":{"url":"https://api.github.com/repos/excon/excon/issues/comments/86584995","html_url":"https://github.com/excon/excon/pull/487#issuecomment-86584995","issue_url":"https://api.github.com/repos/excon/excon/issues/487","id":86584995,"user":{"login":"zanker","id":323517,"avatar_url":"https://avatars.githubusercontent.com/u/323517?v=3","gravatar_id":"","url":"https://api.github.com/users/zanker","html_url":"https://github.com/zanker","followers_url":"https://api.github.com/users/zanker/followers","following_url":"https://api.github.com/users/zanker/following{/other_user}","gists_url":"https://api.github.com/users/zanker/gists{/gist_id}","starred_url":"https://api.github.com/users/zanker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanker/subscriptions","organizations_url":"https://api.github.com/users/zanker/orgs","repos_url":"https://api.github.com/users/zanker/repos","events_url":"https://api.github.com/users/zanker/events{/privacy}","received_events_url":"https://api.github.com/users/zanker/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T15:49:16Z","updated_at":"2015-03-26T15:49:16Z","body":"Probably because I changed the exception rescues a bit, but I reverted that and will see if that fixes it."}}