Permalink
Browse files

Use the defaultTimeout value if no TTURLRequest is given.

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 Sep 9, 2011
1 parent 556de80 commit b38bbf4af304d243fd3ddcb3022d2ead71d21b47
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Three20Network/Sources/TTURLRequestQueue.m
@@ -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;
}

0 comments on commit b38bbf4

Please sign in to comment.