Skip to content

Commit f387291

Browse files
committedMar 24, 2016
Use consistant default value of 60000ms for /qgis/networkAndProxy/networkTimeout
Currently there's an inconsistancy between the Options dialog that displays a default value of 60000ms for network request timeouts, whereas places in the code use 20000ms. I propose to align on 60000s, since there are occurrences of network requests, for example big WFS GetFeature requests, that can take more than 20s to start.
1 parent 140b517 commit f387291

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11089,7 +11089,7 @@ void QgisApp::namSslErrors( QNetworkReply *reply, const QList<QSslError> &errors
1108911089
{
1109011090
QgsDebugMsg( "Restarting network reply timeout" );
1109111091
timer->setSingleShot( true );
11092-
timer->start( s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt() );
11092+
timer->start( s.value( "/qgis/networkAndProxy/networkTimeout", "60000" ).toInt() );
1109311093
}
1109411094
}
1109511095
}

‎src/core/qgshttptransaction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ QgsHttpTransaction::QgsHttpTransaction( const QString& uri,
5858
Q_UNUSED( userName );
5959
Q_UNUSED( password );
6060
QSettings s;
61-
mNetworkTimeoutMsec = s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt();
61+
mNetworkTimeoutMsec = s.value( "/qgis/networkAndProxy/networkTimeout", "60000" ).toInt();
6262
}
6363

6464
QgsHttpTransaction::QgsHttpTransaction()
@@ -69,7 +69,7 @@ QgsHttpTransaction::QgsHttpTransaction()
6969
, mWatchdogTimer( nullptr )
7070
{
7171
QSettings s;
72-
mNetworkTimeoutMsec = s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt();
72+
mNetworkTimeoutMsec = s.value( "/qgis/networkAndProxy/networkTimeout", "60000" ).toInt();
7373
}
7474

7575
QgsHttpTransaction::~QgsHttpTransaction()

‎src/core/qgsnetworkaccessmanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ QNetworkReply *QgsNetworkAccessManager::createRequest( QNetworkAccessManager::Op
217217
timer->setObjectName( "timeoutTimer" );
218218
connect( timer, SIGNAL( timeout() ), this, SLOT( abortRequest() ) );
219219
timer->setSingleShot( true );
220-
timer->start( s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt() );
220+
timer->start( s.value( "/qgis/networkAndProxy/networkTimeout", "60000" ).toInt() );
221221

222222
connect( reply, SIGNAL( downloadProgress( qint64, qint64 ) ), timer, SLOT( start() ) );
223223
connect( reply, SIGNAL( uploadProgress( qint64, qint64 ) ), timer, SLOT( start() ) );

0 commit comments

Comments
 (0)
Please sign in to comment.