Skip to content

Commit

Permalink
Use the defaultTimeout value if no TTURLRequest is given.
Browse files Browse the repository at this point in the history
This fixes a bug where a timeout value of 0.0 seconds is used in a NSURLRequest created without a given TTURLRequest. This causes the NSURLRequest to timeout immediately and fail.
The TTURLRequest is nil when there are several requests in a TTReuestLoader.
  • Loading branch information
matej authored and tonklon committed Jan 6, 2012
1 parent 556de80 commit b38bbf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Three20Network/Sources/TTURLRequestQueue.m
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ - (NSURLRequest*)createNSURLRequest:(TTURLRequest*)request URL:(NSURL*)URL {

NSTimeInterval usedTimeout = request.timeoutInterval;

if (usedTimeout < 0.0) {
if (usedTimeout < 0.0 || request == nil) {
usedTimeout = self.defaultTimeout;
}

Expand Down

0 comments on commit b38bbf4

Please sign in to comment.