Connect through a web proxy more directly #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(First pull request. Apologize for the over-verbosity.)
To resolve #35 seen where EventMachine.bind_connect would fail to create a connection through a Squid web proxy. At worst, this just allows an alternative to what bgreenlee proposed in #2.
Problem:
voloko:twitter-stream (0.1.16), options calling JSONStream::connect
voloko:twitter-stream (0.1.16), options inside of JSONStream::connect
voloko:twitter-stream (0.1.16), JSONStream#send_request never gets called because Twitter::JSONStream.connect(options) hangs... eventually dying with "Tried 11 times to connect."
Resolution provided by this request (0.1.17), options calling JSONStream::connect
...options inside of JSONStream::connect
...by the time JSONStream::connect finishes,
host
,options[:host]
,port
, andoptions[:port]
are overwritten to things that allow EventMachine.bind_connect to work.JSONStream#send_request is called, and options looks as such at the bottom
..., headers at bottom of JSONStream#send_request