aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-02-26 16:16:50 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-02-26 16:16:50 -0800
commite0857f3b91fb0682c12e7d9e542392cefa3b21c2 (patch)
tree8ecd34a31866acfb558fcc2df6dc441636366d9b /src/objective-c/GRPCClient
parent55ea27160e922bca7b03a2b7f898e7afb64e0d9f (diff)
Cancel underlying call when GRPCCall is finished
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m4
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];
}];
});
}