Skip to content

Commit

Permalink
Fix XMLHttpRequest.abort() not functional due to incorrect lazy loadi…
Browse files Browse the repository at this point in the history
…ng in RCTNetworking ObjC module

Summary:
Introduced in a major lazy loading refactoring: 060664f.

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 #5782

Reviewed By: svcscm

Differential Revision: D2907600

Pulled By: nicklockwood

fb-gh-sync-id: 8406a045904a7ddb61fe1539a0474ec27b5e9e37
  • Loading branch information
lassebm authored and facebook-github-bot-5 committed Feb 5, 2016
1 parent a308546 commit 995b66d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Network/RCTNetworking.m
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ - (void)sendRequest:(NSURLRequest *)request
task.uploadProgressBlock = uploadProgressBlock;

if (task.requestID) {
if (_tasksByRequestID) {
if (!_tasksByRequestID) {
_tasksByRequestID = [NSMutableDictionary new];
}
_tasksByRequestID[task.requestID] = task;
Expand Down

0 comments on commit 995b66d

Please sign in to comment.