Skip to content
Permalink
Browse files

Retry WMS/WMTS/XYZ requests only on timeout (fixes #15854)

It does not really make sense to retry if server returns 404 Not Found or similar...
  • Loading branch information
wonder-sk committed Feb 26, 2017
1 parent a18066b commit 171dfe113034767d9941d7041afce6c5e4ecb027
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/wms/qgswmsprovider.cpp
@@ -3922,8 +3922,6 @@ void QgsWmsTiledImageDownloadHandler::tileReplyFinished()
{
QgsMessageLog::logMessage( tr( "Returned image is flawed [Content-Type:%1; URL: %2]" )
.arg( contentType, reply->url().toString() ), tr( "WMS" ) );

repeatTileRequest( reply->request() );
}
}
else
@@ -3948,7 +3946,9 @@ void QgsWmsTiledImageDownloadHandler::tileReplyFinished()
QgsWmsStatistics::Stat& stat = QgsWmsStatistics::statForUri( mProviderUri );
stat.errors++;

repeatTileRequest( reply->request() );
// if we reached timeout, let's try again (e.g. in case of slow connection or slow server)
if ( reply->error() == QNetworkReply::TimeoutError )
repeatTileRequest( reply->request() );
}
}

1 comment on commit 171dfe1

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn commented on 171dfe1 Feb 26, 2017

@wonder-sk , good move.

Please sign in to comment.
You can’t perform that action at this time.