Set default transfer timeout to infinity
Apparently the default before introducing the request timeout was not 30000 (which is the value of QNetworkRequest::TransferTimeoutConstant). There was actually no timeout. So let's restore this behavior for now as the main intention was to make the timeout configurable but not change any defaults.
This commit is contained in:
parent
faeefba03f
commit
69568ea6dd
|
@ -81,7 +81,7 @@ SyncthingConnection::SyncthingConnection(
|
|||
, m_lastEventId(0)
|
||||
, m_lastDiskEventId(0)
|
||||
, m_autoReconnectTries(0)
|
||||
, m_requestTimeout(QNetworkRequest::DefaultTransferTimeoutConstant)
|
||||
, m_requestTimeout(SyncthingConnectionSettings::defaultRequestTimeout)
|
||||
, m_totalIncomingTraffic(unknownTraffic)
|
||||
, m_totalOutgoingTraffic(unknownTraffic)
|
||||
, m_totalIncomingRate(0.0)
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <QByteArray>
|
||||
#include <QList>
|
||||
#include <QNetworkRequest>
|
||||
#include <QSslError>
|
||||
#include <QString>
|
||||
|
||||
|
@ -55,7 +54,7 @@ struct LIB_SYNCTHING_CONNECTOR_EXPORT SyncthingConnectionSettings {
|
|||
static constexpr int defaultDevStatusPollInterval = 60000;
|
||||
static constexpr int defaultErrorsPollInterval = 30000;
|
||||
static constexpr int defaultReconnectInterval = 30000;
|
||||
static constexpr int defaultRequestTimeout = QNetworkRequest::DefaultTransferTimeoutConstant;
|
||||
static constexpr int defaultRequestTimeout = 0;
|
||||
};
|
||||
} // namespace Data
|
||||
|
||||
|
|
Loading…
Reference in New Issue