diff options
author | Muxi Yan <mxyan@google.com> | 2018-11-06 11:31:48 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-11-06 11:31:48 -0800 |
commit | 24265b03ac5c6ace73916f3bc3a847abf1c64c33 (patch) | |
tree | bdbfb02324c71a06621aaaeb542875817cfdb390 /src/objective-c/GRPCClient | |
parent | 739760cdc8a6625fe93f4f0312d84305052b0d09 (diff) |
Clarify cancel before call is started
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.h | 1 | ||||
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.m | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h index 4f0660d203..f713262b64 100644 --- a/src/objective-c/GRPCClient/GRPCCall.h +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -245,6 +245,7 @@ extern NSString *const kGRPCTrailersKey; /** * Starts the call. This function should only be called once; additional calls will be discarded. + * Invokes after calling cancel: are discarded. */ - (void)start; diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 9be0554ff9..5ce361300d 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -209,6 +209,7 @@ const char *kCFStreamVarName = "grpc_cfstream"; - (void)cancel { dispatch_async(_dispatchQueue, ^{ + self->_started = YES; if (self->_call) { [self->_call cancel]; self->_call = nil; |