LRResty icon indicating copy to clipboard operation
LRResty copied to clipboard

synchronus request just hangs

Open arloan opened this issue 14 years ago • 5 comments
trafficstars

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.

arloan avatar Oct 28 '11 02:10 arloan

Could you please try this using the latest HEAD version and get back to me.

lukeredpath avatar Dec 13 '11 01:12 lukeredpath

I've confirmed that the problem is still there with the lastest downloadable version.

arloan avatar Mar 06 '12 08:03 arloan

i can confirm the issue, at (0.11.0).

siuying avatar Apr 05 '12 15:04 siuying

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.

siuying avatar Apr 06 '12 15:04 siuying

I can confirm this issue, using the .framework file from the Mac Nightly Build, dated Fri Dec 09 00:01:55 +0000 2011.

pcperini avatar Apr 29 '12 07:04 pcperini