Skip to content

Commit

Permalink
Fetch host and port directly from the request object
Browse files Browse the repository at this point in the history
Closes #709.
  • Loading branch information
sferik committed Jan 19, 2016
1 parent d047ce0 commit f9f1bbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twitter/streaming/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(opts = {})

def stream(request, response)
client_context = OpenSSL::SSL::SSLContext.new
client = @tcp_socket_class.new(Resolv.getaddress(request.uri.host), request.uri.port)
client = @tcp_socket_class.new(Resolv.getaddress(request.socket_host), request.socket_port)
ssl_client = @ssl_socket_class.new(client, client_context)

ssl_client.connect
Expand Down

0 comments on commit f9f1bbd

Please sign in to comment.