Merge pull request #380 from nextcloud/upstream/pr/6533

Propagation: Connection closed is a normal error #6516
This commit is contained in:
Roeland Jago Douma 2018-06-07 09:35:32 +02:00 committed by GitHub
commit b2a8eea875
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;