Skip to content
Snippets Groups Projects
Commit 10ddfde8 authored by Tim Emiola's avatar Tim Emiola
Browse files

Adds grpc.primary_user_agent key during stub creation

parent 9a2a3aec
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require 'grpc/generic/active_call' require 'grpc/generic/active_call'
require 'grpc/version'
# GRPC contains the General RPC module. # GRPC contains the General RPC module.
module GRPC module GRPC
...@@ -46,6 +47,7 @@ module GRPC ...@@ -46,6 +47,7 @@ module GRPC
fail(TypeError, '!Channel') unless alt_chan.is_a?(Core::Channel) fail(TypeError, '!Channel') unless alt_chan.is_a?(Core::Channel)
return alt_chan return alt_chan
end end
kw['grpc.primary_user_agent'] = "grpc-ruby/#{VERSION}"
return Core::Channel.new(host, kw) if creds.nil? return Core::Channel.new(host, kw) if creds.nil?
fail(TypeError, '!Credentials') unless creds.is_a?(Core::Credentials) fail(TypeError, '!Credentials') unless creds.is_a?(Core::Credentials)
Core::Channel.new(host, kw, creds) Core::Channel.new(host, kw, creds)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment