[ReactNative] Fix racing condition on RKHTTPRequestHandler
This commit is contained in:
parent
c30365acba
commit
58c58d9bed
|
@ -134,12 +134,12 @@ typedef void (^RCTHTTPQueryResult)(NSError *error, NSDictionary *result);
|
||||||
|
|
||||||
@implementation RCTActiveURLRequest
|
@implementation RCTActiveURLRequest
|
||||||
|
|
||||||
- (void)setResponse:(NSURLResponse *)response;
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
_response = response;
|
if ((self = [super init])) {
|
||||||
if (!_incrementalUpdates) {
|
_data = [[NSMutableData alloc] init];
|
||||||
_data = [[NSMutableData alloc] initWithCapacity:(NSUInteger)MAX(0, response.expectedContentLength)];
|
|
||||||
}
|
}
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue