Log failures when unable to create call or channel

pull/16190/head
Muxi Yan 6 years ago
parent 395fc1226f
commit c827fbc1d0
  1. 5
      src/objective-c/GRPCClient/private/GRPCWrappedCall.m

@ -257,8 +257,13 @@
// queue. Currently we use a singleton queue. // queue. Currently we use a singleton queue.
_queue = [GRPCCompletionQueue completionQueue]; _queue = [GRPCCompletionQueue completionQueue];
_channel = [GRPCChannel channelWithHost:host callOptions:callOptions]; _channel = [GRPCChannel channelWithHost:host callOptions:callOptions];
if (_channel == nil) {
NSLog(@"Failed to get a channel for the host.");
return nil;
}
_call = [_channel unmanagedCallWithPath:path completionQueue:_queue callOptions:callOptions]; _call = [_channel unmanagedCallWithPath:path completionQueue:_queue callOptions:callOptions];
if (_call == NULL) { if (_call == NULL) {
NSLog(@"Failed to create a call.");
return nil; return nil;
} }
} }

Loading…
Cancel
Save