Merge pull request #35 from evanlong/master
Consistent use of main thread for success/failure callbacks in AFJSONRequestOperation
This commit is contained in:
commit
e67a7ee20e
1 changed files with 6 additions and 2 deletions
|
|
@ -84,11 +84,15 @@ static dispatch_queue_t json_request_operation_processing_queue() {
|
|||
|
||||
if (error) {
|
||||
if (failure) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
failure(request, response, error);
|
||||
});
|
||||
}
|
||||
} else if ([data length] == 0) {
|
||||
if (success) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
success(request, response, nil);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
dispatch_async(json_request_operation_processing_queue(), ^(void) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue