Skip to content

Commit e42e6b3

Browse files
Kai SongKai Song
Kai Song
authored and
Kai Song
committedJul 22, 2024·
Retry network requests on NSURLErrorNotConnectedToInternet after extended delay
1 parent 5143d12 commit e42e6b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎IdentityCore/src/network/error_handler/MSIDAADRequestErrorHandler.m

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ - (void)handleError:(NSError *)error
5050
{
5151
// Networking errors (-1001, -1003. -1004. -1005. -1009)
5252
shouldRetryNetworkingFailure = [self shouldRetryNetworkingFailure:error.code];
53+
if (error.code == NSURLErrorNotConnectedToInternet)
54+
{
55+
// For handling the NSURLErrorNotConnectedToInternet error, retry the network request after a longer delay.
56+
httpRequest.retryInterval = 2.0;
57+
}
5358
}
5459

5560
shouldRetry &= shouldRetryNetworkingFailure;

0 commit comments

Comments
 (0)
Please sign in to comment.