Browse files

TTURLRequest / NSURLRequest immediate timeout issues

  • Loading branch information...
1 parent b38bbf4 commit 9c36bed9cd7a71be47d24025690199e95d72eed2 @scompt scompt committed with tonklon Dec 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Three20Network/Sources/TTRequestLoader.m
View
4 src/Three20Network/Sources/TTRequestLoader.m
@@ -126,7 +126,7 @@ - (void)connectToURL:(NSURL*)URL {
}
TTNetworkRequestStarted();
- TTURLRequest* request = _requests.count == 1 ? [_requests objectAtIndex:0] : nil;
+ TTURLRequest* request = _requests.count >= 1 ? [_requests objectAtIndex:0] : nil;
// there are situations where urlPath is somehow nil (therefore crashing in
// createNSURLRequest:URL:, even if we checked for non-blank values before
@@ -194,7 +194,7 @@ - (void)loadSynchronously:(NSURL*)URL {
// correctly, this would be the place to start tracing for errors.
TTNetworkRequestStarted();
- TTURLRequest* request = _requests.count == 1 ? [_requests objectAtIndex:0] : nil;
+ TTURLRequest* request = _requests.count >= 1 ? [_requests objectAtIndex:0] : nil;
NSURLRequest* URLRequest = [_queue createNSURLRequest:request URL:URL];
NSHTTPURLResponse* response = nil;

0 comments on commit 9c36bed

Please sign in to comment.