diff options
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index e2c249cead..3c55014aba 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -343,6 +343,8 @@ static NSString * const kBearerPrefix = @"Bearer "; [strongSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain code:GRPCErrorCodeInternal userInfo:nil]]; + // Wrapped call must be canceled when error is reported to upper layers + [strongSelf cancelCall]; } }]; }); @@ -372,6 +374,8 @@ static NSString * const kBearerPrefix = @"Bearer "; [strongSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain code:GRPCErrorCodeInternal userInfo:nil]]; + // Wrapped call must be canceled when error is reported to upper layers + [strongSelf cancelCall]; }]; }); } |