mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 13:44:04 +00:00
Fix XMLHttpRequest.abort() not functional due to incorrect lazy loading in RCTNetworking ObjC module
Summary: Introduced in a major lazy loading refactoring: 060664fd3d9331f062696e68179bac9cd4544a06. This is especially an issue when aborting a long-lived HTTP connection used as a notification channel, as it will use 1 of the maximum 4 connections per host (default limit defined by iOS' NSURLSession). Closes https://github.com/facebook/react-native/pull/5782 Reviewed By: svcscm Differential Revision: D2907600 Pulled By: nicklockwood fb-gh-sync-id: 8406a045904a7ddb61fe1539a0474ec27b5e9e37
This commit is contained in:
parent
a3085464f6
commit
995b66db82
@ -411,7 +411,7 @@ RCT_EXPORT_MODULE()
|
||||
task.uploadProgressBlock = uploadProgressBlock;
|
||||
|
||||
if (task.requestID) {
|
||||
if (_tasksByRequestID) {
|
||||
if (!_tasksByRequestID) {
|
||||
_tasksByRequestID = [NSMutableDictionary new];
|
||||
}
|
||||
_tasksByRequestID[task.requestID] = task;
|
||||
|
Loading…
x
Reference in New Issue
Block a user