Skip to content

Commit e99caac

Browse files
troopa81nyalldawson
authored andcommittedAug 4, 2021
Fix handleSSlError ignore saved errors
1 parent 2a008a8 commit e99caac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎src/app/qgsappsslerrorhandler.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ void QgsAppSslErrorHandler::handleSslErrors( QNetworkReply *reply, const QList<Q
4141
QgsDebugMsg( QStringLiteral( "Ignored SSL errors cached item found, ignoring errors if they match for %1" ).arg( hostport ) );
4242
const QSet<QSslError::SslError> &errenums( errscache.value( dgsthostport ) );
4343
bool ignore = !errenums.isEmpty();
44-
int errmatched = 0;
4544
if ( ignore )
4645
{
4746
for ( const QSslError &error : errors )
@@ -51,11 +50,10 @@ void QgsAppSslErrorHandler::handleSslErrors( QNetworkReply *reply, const QList<Q
5150

5251
bool errmatch = errenums.contains( error.error() );
5352
ignore = ignore && errmatch;
54-
errmatched += errmatch ? 1 : 0;
5553
}
5654
}
5755

58-
if ( ignore && errenums.size() == errmatched )
56+
if ( ignore )
5957
{
6058
QgsDebugMsg( QStringLiteral( "Errors matched cached item's, ignoring all for %1" ).arg( hostport ) );
6159
reply->ignoreSslErrors();

0 commit comments

Comments
 (0)
Please sign in to comment.