pull/16190/head
Muxi Yan 6 years ago
parent df21aab3a6
commit 3f00d61b04
  1. 1
      src/objective-c/GRPCClient/private/GRPCWrappedCall.m
  2. 18
      src/objective-c/ProtoRPC/ProtoRPC.m

@ -320,6 +320,7 @@
_call = NULL;
}
}
// Explicitly converting weak reference _pooledChannel to strong.
__strong GRPCPooledChannel *channel = _pooledChannel;
[channel notifyWrappedCallDealloc:self];
}

@ -140,7 +140,11 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing
}
- (void)start {
[_call start];
GRPCCall2 *copiedCall;
@synchronized(self) {
copiedCall = _call;
}
[copiedCall start];
}
- (void)cancel {
@ -177,20 +181,20 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing
return;
}
GRPCCall2 *call;
GRPCCall2 *copiedCall;
@synchronized(self) {
call = _call;
copiedCall = _call;
}
[call writeData:[message data]];
[copiedCall writeData:[message data]];
}
- (void)finish {
GRPCCall2 *call;
GRPCCall2 *copiedCall;
@synchronized(self) {
call = _call;
copiedCall = _call;
_call = nil;
}
[call finish];
[copiedCall finish];
}
- (void)didReceiveInitialMetadata:(NSDictionary *)initialMetadata {

Loading…
Cancel
Save