pull/971/head
Tim Emiola 10 years ago
parent c32375c67c
commit 4c7caf6180
  1. 10
      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

Loading…
Cancel
Save