LRResty
LRResty copied to clipboard
synchronus request just hangs
i.e LRRestyClient get: never get returned (all other synchronized request methods do).
build env: SL 10.6.8 xcode 4.0 target: iOS 4.3.2 (simulator, not tested in real box)
code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSLog(@"%s: begin.", FUNCTION); LRRestyResponse * lr = [[LRResty client] get:@"http://www.google.com/ncr"];
NSLog(@"r: %@", [lr asString]);
.... (omitted)
}
get an console output like '-[UFBXMobileAppDelegate application:didFinishLaunchingWithOptions:]: begin.' and the main window does not showup.
PS. async calls work fine, except that I cannot block the thread committed the async calls, or else the async calls do not run.
Could you please try this using the latest HEAD version and get back to me.
I've confirmed that the problem is still there with the lastest downloadable version.
i can confirm the issue, at (0.11.0).
i think my case are cause by i running unit test, in the main app it has no issue, and only in test it block and hangs (both sync and async calls).
I test with ASIHTTPRequest and it seems it is okay in sync mode and hang in async mode. It seems some operation of their async code are working in main thread, and my test running in main thread and blocking them to proceed properly.
I can confirm this issue, using the .framework file from the Mac Nightly Build, dated Fri Dec 09 00:01:55 +0000 2011.