Cancel underlying call when GRPCCall is finished

pull/14529/head
Muxi Yan 7 years ago
parent 55ea27160e
commit e0857f3b91
  1. 4
      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];
}];
});
}

Loading…
Cancel
Save