Release self retain only after all clean-up done

pull/14874/head
Muxi Yan 7 years ago committed by GitHub
parent 1995816b6b
commit bb10d2a58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/objective-c/GRPCClient/GRPCCall.m

@ -196,9 +196,6 @@ static NSString * const kBearerPrefix = @"Bearer ";
_state = GRXWriterStateFinished;
}
// If the call isn't retained anywhere else, it can be deallocated now.
_retainSelf = nil;
// If there were still request messages coming, stop them.
@synchronized(_requestWriter) {
_requestWriter.state = GRXWriterStateFinished;
@ -211,6 +208,9 @@ static NSString * const kBearerPrefix = @"Bearer ";
}
[GRPCConnectivityMonitor unregisterObserver:self];
// If the call isn't retained anywhere else, it can be deallocated now.
_retainSelf = nil;
}
- (void)cancelCall {

Loading…
Cancel
Save