From 7603d64982ea5de924218d600a851d6c8a4e6415 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 24 Aug 2016 18:23:24 -0700 Subject: Let tracing be enabled before starting an RPC by calling grpc_init on [GRPCCall load], instead of lazily. --- src/objective-c/GRPCClient/GRPCCall.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/objective-c/GRPCClient/GRPCCall.m') diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index da9473f9a2..b5d8309787 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -103,6 +103,11 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; @synthesize state = _state; +// TODO(jcanizales): If grpc_init is idempotent, this should be changed from load to initialize. ++ (void)load { + grpc_init(); +} + - (instancetype)init { return [self initWithHost:nil path:nil requestsWriter:nil]; } -- cgit v1.2.3