Propagation: Make 503 a fatal error.

Running further propagation jobs when the server is likely to be
503 for a time does not seem very useful.
This commit is contained in:
Christian Kamm 2015-07-01 13:57:34 +02:00
parent 8aeb3cc8d2
commit 2d08e02dda

View file

@ -52,11 +52,17 @@ inline QByteArray getEtagFromReply(QNetworkReply *reply)
inline SyncFileItem::Status classifyError(QNetworkReply::NetworkError nerror, int httpCode) {
Q_ASSERT (nerror != QNetworkReply::NoError); // we should only be called when there is an error
if (nerror > QNetworkReply::NoError && nerror <= QNetworkReply::UnknownProxyError) {
if (nerror > QNetworkReply::NoError && nerror <= QNetworkReply::UnknownProxyError) {
// network error or proxy error -> fatal
return SyncFileItem::FatalError;
}
if (httpCode == 503) {
// "Service unavailable"
// Happens for maintenance mode and other temporary outages
return SyncFileItem::FatalError;
}
if (httpCode == 412) {
// "Precondition Failed"
// Happens when the e-tag has changed