Skip to content

Commit 2c2fdb9

Browse files
authored
Merge pull request #563 from AzureAD/oldaton/network_bg
Retry 500 error on background queue
2 parents 99183ac + 241559a commit 2c2fdb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

IdentityCore/src/network/error_handler/MSIDAADRequestErrorHandler.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ - (void)handleError:(NSError * )error
5353

5454
MSID_LOG_VERBOSE(context, @"Retrying network request, retryCounter: %ld", (long)httpRequest.retryCounter);
5555

56-
[httpRequest performSelector:@selector(sendWithBlock:)
57-
withObject:completionBlock
58-
afterDelay:(int64_t)httpRequest.retryInterval];
56+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(httpRequest.retryInterval * NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
57+
[httpRequest sendWithBlock:completionBlock];
58+
});
5959

6060
return;
6161
}

0 commit comments

Comments
 (0)