If my connection hangs, is there a way to set a timeout for TTURLReques开发者_开发知识库t?
The kTimeout constant is the initial time constant. You can configure the timeout by following:
[TTURLRequestQueue mainQueue].defaultTimeout = 30; //in case you want 30 seconds
No, the timeout is hardcoded in TTURLRequestQueue.m:
static const NSTimeInterval kTimeout = 300.0;
I really wonder why this is.
精彩评论