Propagation: Connection closed is a normal error #6516

Because it sometimes appears in conjunction with server bugs and we
don't want to halt all syncing for other files in these cases.
This commit is contained in:
Christian Kamm 2018-05-16 15:51:31 +02:00 committed by Roeland Jago Douma
parent f540c37ad3
commit 4fa762b5ce
No known key found for this signature in database
GPG Key ID: F941078878347C0C

View File

@ -64,6 +64,12 @@ inline SyncFileItem::Status classifyError(QNetworkReply::NetworkError nerror,
{
Q_ASSERT(nerror != QNetworkReply::NoError); // we should only be called when there is an error
if (nerror == QNetworkReply::RemoteHostClosedError) {
// Sometimes server bugs lead to a connection close on certain files,
// that shouldn't bring the rest of the syncing to a halt.
return SyncFileItem::NormalError;
}
if (nerror > QNetworkReply::NoError && nerror <= QNetworkReply::UnknownProxyError) {
// network error or proxy error -> fatal
return SyncFileItem::FatalError;