pull/16190/head
Muxi Yan 6 years ago
parent 20c8cc7292
commit 3fc5ca0c75
  1. 2
      src/objective-c/GRPCClient/private/GRPCInsecureChannelFactory.m
  2. 2
      src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.m
  3. 4
      src/objective-c/GRPCClient/private/GRPCWrappedCall.m

@ -33,7 +33,7 @@
}
- (grpc_channel *)createChannelWithHost:(NSString *)host channelArgs:(NSDictionary *)args {
grpc_channel_args *coreChannelArgs = GRPCBuildChannelArgs([args copy]);
grpc_channel_args *coreChannelArgs = GRPCBuildChannelArgs(args);
grpc_channel *unmanagedChannel =
grpc_insecure_channel_create(host.UTF8String, coreChannelArgs, NULL);
GRPCFreeChannelArgs(coreChannelArgs);

@ -119,7 +119,7 @@
if (host.length == 0) {
return NULL;
}
grpc_channel_args *coreChannelArgs = GRPCBuildChannelArgs([args copy]);
grpc_channel_args *coreChannelArgs = GRPCBuildChannelArgs(args);
grpc_channel *unmanagedChannel =
grpc_secure_channel_create(_channelCreds, host.UTF8String, coreChannelArgs, NULL);
GRPCFreeChannelArgs(coreChannelArgs);

@ -307,6 +307,10 @@
- (void)channelDisconnected {
@synchronized(self) {
if (_call != NULL) {
// Unreference the call will lead to its cancellation in the core. Note that since
// this function is only called with a network state change, any existing GRPCCall object will
// also receive the same notification and cancel themselves with GRPCErrorCodeUnavailable, so
// the user gets GRPCErrorCodeUnavailable in this case.
grpc_call_unref(_call);
_call = NULL;
}

Loading…
Cancel
Save