Use nested if/else instead of early return in -connection:didReceiveAuthenticationChallenge:

This commit is contained in:
Mattt Thompson 2012-01-10 13:41:36 -08:00
parent 8869bb9ad3
commit bdab46889b

View file

@ -318,9 +318,7 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
if (self.authenticationBlock) {
self.authenticationBlock(connection, challenge);
return;
}
} else {
if ([challenge previousFailureCount] == 0) {
NSURLCredential *credential = nil;
@ -341,6 +339,7 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
} else {
[[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
}
}
}
- (void)connection:(NSURLConnection *)__unused connection