- fix bug in update timer calculation
[buliscores] / src / backendkicker.cpp
index 59c8600..f807981 100644 (file)
@@ -241,10 +241,12 @@ void BackendKicker::dlndFinished(QNetworkReply *reply)
     }
 
     secstonextupdate = secsToNextGame();
-    if (secstonextupdate < INTERVAL_FAST) {
-        secstonextupdate = INTERVAL_FAST;
-    } else if (secstonextupdate > 6 * 3600) {
+    if ((secstonextupdate == -1) ||
+        (secstonextupdate > 6 * 3600)) {
+        // all games finished for this matchday
         secstonextupdate = 6 * 3600;
+    } else if (secstonextupdate < INTERVAL_FAST) {
+        secstonextupdate = INTERVAL_FAST;
     }
     m_updateTimer.start(secstonextupdate * 1000);