From 3079836dc8970bf17670f76ed5bb302e9ce30cae Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Thu, 16 Oct 2014 19:54:08 +0200 Subject: [PATCH] Fix bug in server checker background service that would incorrectly stop all checking (for subsequent servers) if one was not available. Fixes #166. --- .../src/org/transdroid/core/service/ServerCheckerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/org/transdroid/core/service/ServerCheckerService.java b/core/src/org/transdroid/core/service/ServerCheckerService.java index 7abe99fc..4d0f5de4 100644 --- a/core/src/org/transdroid/core/service/ServerCheckerService.java +++ b/core/src/org/transdroid/core/service/ServerCheckerService.java @@ -85,7 +85,7 @@ public class ServerCheckerService extends IntentService { // enabled by the user for this specific server if (server.getType() == null || server.getAddress() == null || server.getAddress().equals("") || !(server.shouldAlarmOnFinishedDownload() || server.shouldAlarmOnNewTorrent())) - return; + continue; // Get the statistics for the last time we checked this server JSONArray lastStats = applicationSettings.getServerLastStats(server); @@ -95,7 +95,7 @@ public class ServerCheckerService extends IntentService { DaemonTaskResult result = RetrieveTask.create(adapter).execute(); if (!(result instanceof RetrieveTaskSuccessResult)) { // Cannot retrieve torrents at this time - return; + continue; } List retrieved = ((RetrieveTaskSuccessResult) result).getTorrents(); Log.d(this, server.getName() + ": Retrieved torrent listing");