|  | @@ -228,14 +228,20 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *_Nullable))completionHandler
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  | -    if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
 | 
	
		
			
				|  |  | -        if (challenge.previousFailureCount == 0) {
 | 
	
		
			
				|  |  | -            NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
 | 
	
		
			
				|  |  | -            completionHandler(NSURLSessionAuthChallengeUseCredential, credential);
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | +    dispatch_queue_t queue =  dispatch_queue_create("webViewChallengeQueue", NULL);
 | 
	
		
			
				|  |  | +    dispatch_async(queue, ^{
 | 
	
		
			
				|  |  | +        if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
 | 
	
		
			
				|  |  | +            if (challenge.previousFailureCount == 0) {
 | 
	
		
			
				|  |  | +                NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
 | 
	
		
			
				|  |  | +                completionHandler(NSURLSessionAuthChallengeUseCredential, credential);
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        else {
 | 
	
		
			
				|  |  |              completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  #pragma mark - WKScriptMessageHandler
 | 
	
		
			
				|  |  |  - (void)userContentController:(WKUserContentController *)userContentController
 |