From 0a9670f56bd1de2c3d5361cb2eb34faff93ac4a2 Mon Sep 17 00:00:00 2001 From: APTX Date: Sun, 26 May 2013 23:35:17 +0200 Subject: [PATCH] Set connection_error_count and data_error_count only in one place. --- localmylist/database.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/localmylist/database.cpp b/localmylist/database.cpp index 9106f76..60e3c57 100644 --- a/localmylist/database.cpp +++ b/localmylist/database.cpp @@ -1331,7 +1331,7 @@ bool Database::pendingRequestDataError(const PendingRequest &request) { QSqlQuery &q = prepare( "UPDATE pending_request " - " SET connection_error_count = 0, data_error_count = data_error_count + 1, failed = now() " + " SET failed = now() " " WHERE aid = :aid " " AND eid = :eid " " AND fid = :fid " @@ -1393,6 +1393,7 @@ bool Database::clearPendingRequestConnectionErrors(int minutes) bool Database::clearPendingRequestDataErrors() { // TODO make this configurable? + // These are in hours const int steps[] = {1, 2, 4, 8, 24, 48, 48, 48, 48}; QSqlQuery &q = prepare( -- 2.52.0