|
|
|
@ -468,7 +468,9 @@ const char *kCFStreamVarName = "grpc_cfstream"; |
|
|
|
|
|
|
|
|
|
- (void)cancelCall { |
|
|
|
|
// Can be called from any thread, any number of times. |
|
|
|
|
[_wrappedCall cancel]; |
|
|
|
|
@synchronized (self) { |
|
|
|
|
[_wrappedCall cancel]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
- (void)cancel { |
|
|
|
@ -730,17 +732,21 @@ const char *kCFStreamVarName = "grpc_cfstream"; |
|
|
|
|
_responseWriteable = |
|
|
|
|
[[GRXConcurrentWriteable alloc] initWithWriteable:writeable dispatchQueue:_responseQueue]; |
|
|
|
|
|
|
|
|
|
_wrappedCall = [[GRPCWrappedCall alloc] initWithHost:_host path:_path callOptions:_callOptions]; |
|
|
|
|
if (_wrappedCall == nil) { |
|
|
|
|
GRPCWrappedCall *wrappedCall = [[GRPCWrappedCall alloc] initWithHost:_host path:_path callOptions:_callOptions]; |
|
|
|
|
if (wrappedCall == nil) { |
|
|
|
|
[self maybeFinishWithError:[NSError errorWithDomain:kGRPCErrorDomain |
|
|
|
|
code:GRPCErrorCodeUnavailable |
|
|
|
|
userInfo:@{ |
|
|
|
|
NSLocalizedDescriptionKey : |
|
|
|
|
@"Failed to create call or channel." |
|
|
|
|
}]]; |
|
|
|
|
NSLocalizedDescriptionKey : |
|
|
|
|
@"Failed to create call or channel." |
|
|
|
|
}]]; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@synchronized (self) { |
|
|
|
|
_wrappedCall = wrappedCall; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[self sendHeaders]; |
|
|
|
|
[self invokeCall]; |
|
|
|
|
|
|
|
|
|