Nocilla
Nocilla copied to clipboard
ASIHTTPRequest synchronous request with stub never ends
I don't know is it still in your list of priorities, but I found out that your library does not want to work with ASIHTTPRequest correctly. My AFNetworking requests finished successfully, but ASIHTTPRequest request that starts synchronously never leaves this loop (ASIHTTPRequest:765, method -startSynchronous
):
if (![self isCancelled] && ![self complete]) {
[self main];
while (!complete) {
[[NSRunLoop currentRunLoop] runMode:[self runLoopMode] beforeDate:[NSDate distantFuture]];
}
}
After Nocilla calls -requestFinished
this local variable (complete
) stays the same.
[NSDate distantFuture]
is going to cause this code to wait indefinitely and never check your complete
variable. Change this to something like [NSDate dateWithTimeIntervalSinceNow:1.0]
and see if that helps.
If you still see issues, provide sample code so that we can test/reproduce ourselves and look into it.