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
Getting EventMachine::ConnectionNotBound error with 0.2.10 #42
Comments
Hmm, well I'm not sure that the code makes sense the way it is setup currently. You can't call return from a callback like that (unless I'm missing something at the moment). If you remove the return statement, everything will work just fine. If you need ~ blocking API, you should take a look at em-synchrony. |
I'm actually not using em-http-request in any of my projects; I just want to make sure VCR supports it. All of the other HTTP libraries supported by VCR are synchronous, and use the same shared specs, with each implementing Using I did a git bisect, and it appears that this commit is the first commit where this no longer worked. I can rewrite the method like this, and it seems to work fine: def make_http_request(url) http = nil EventMachine.run do http = EventMachine::HttpRequest.new(url).get http.callback { EventMachine.stop } end http end So I can work around it. |
Right, I see. It's not obvious to me why the redirect logic would be causing this behavior. I'll take a closer look, but since the above works, we ok to close the ticket? |
Yep, thanks. |
em_http_example.rb:
Output:
The text was updated successfully, but these errors were encountered: