diff options
author | Tim Emiola <temiola@google.com> | 2015-03-06 11:35:58 -0800 |
---|---|---|
committer | Tim Emiola <temiola@google.com> | 2015-03-06 11:36:24 -0800 |
commit | 4c7caf61803ea2acd9b06730fa8e1d22912a2520 (patch) | |
tree | 5f1ea268c51ec9a8b60d9f5d8d892b272af5ecb3 /src/ruby/lib/grpc/generic/client_stub.rb | |
parent | c32375c67c1142563a65226eb8e047d6ba73943a (diff) |
Fix for #804
Diffstat (limited to 'src/ruby/lib/grpc/generic/client_stub.rb')
-rw-r--r-- | src/ruby/lib/grpc/generic/client_stub.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb index fc9c7a2b52..01328d4a5b 100644 --- a/src/ruby/lib/grpc/generic/client_stub.rb +++ b/src/ruby/lib/grpc/generic/client_stub.rb @@ -101,7 +101,8 @@ module GRPC @queue = q @ch = ClientStub.setup_channel(channel_override, host, creds, **kw) @update_metadata = ClientStub.check_update_metadata(update_metadata) - @host = host + alt_host = kw[Core::Channel::SSL_TARGET] + @host = alt_host.nil? ? host : alt_host @deadline = deadline end @@ -395,12 +396,7 @@ module GRPC # @param deadline [TimeConst] def new_active_call(ch, marshal, unmarshal, deadline = nil) absolute_deadline = Core::TimeConsts.from_relative_time(deadline) - # It should be OK to to pass the hostname:port to create_call, but at - # the moment this fails a security check. This will be corrected. - # - # TODO: # remove this after create_call is updated - host = @host.split(':')[0] - call = @ch.create_call(ch, host, absolute_deadline) + call = @ch.create_call(ch, @host, absolute_deadline) ActiveCall.new(call, @queue, marshal, unmarshal, absolute_deadline, started: false) end |