diff options
author | Muxi Yan <mxyan@google.com> | 2018-12-12 14:30:12 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-12-12 14:30:12 -0800 |
commit | 3fc5ca0c75aae97e9201df000a5afd5f628403b8 (patch) | |
tree | 59e4904776159a961466002bcf6d11d7f9e7cebc /src/objective-c/GRPCClient/private/GRPCWrappedCall.m | |
parent | 20c8cc72920b14520160c4e2001caec2b8acddc0 (diff) |
batch fix
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCWrappedCall.m')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCWrappedCall.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 4edd9d3e37..1a848a4b7c 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -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; } |