Fix authorizer bug

pull/17751/head
Muxi Yan 6 years ago
parent 10fa278660
commit e5453b1864
  1. 8
      src/objective-c/GRPCClient/GRPCCall.m

@ -889,14 +889,18 @@ const char *kCFStreamVarName = "grpc_cfstream";
[tokenProvider getTokenWithHandler:^(NSString *token) {
__strong typeof(self) strongSelf = weakSelf;
if (strongSelf) {
BOOL startCall = NO;
@synchronized(strongSelf) {
if (strongSelf->_state == GRXWriterStateNotStarted) {
if (strongSelf->_state != GRXWriterStateFinished) {
startCall = YES;
if (token) {
strongSelf->_fetchedOauth2AccessToken = [token copy];
}
}
}
[strongSelf startCallWithWriteable:writeable];
if (startCall) {
[strongSelf startCallWithWriteable:writeable];
}
}
}];
} else {

Loading…
Cancel
Save