Clarify cancel before call is started

pull/16190/head
Muxi Yan 6 years ago
parent 739760cdc8
commit 24265b03ac
  1. 1
      src/objective-c/GRPCClient/GRPCCall.h
  2. 1
      src/objective-c/GRPCClient/GRPCCall.m

@ -245,6 +245,7 @@ extern NSString *const kGRPCTrailersKey;
/** /**
* Starts the call. This function should only be called once; additional calls will be discarded. * Starts the call. This function should only be called once; additional calls will be discarded.
* Invokes after calling cancel: are discarded.
*/ */
- (void)start; - (void)start;

@ -209,6 +209,7 @@ const char *kCFStreamVarName = "grpc_cfstream";
- (void)cancel { - (void)cancel {
dispatch_async(_dispatchQueue, ^{ dispatch_async(_dispatchQueue, ^{
self->_started = YES;
if (self->_call) { if (self->_call) {
[self->_call cancel]; [self->_call cancel];
self->_call = nil; self->_call = nil;

Loading…
Cancel
Save