[tor-commits] [metrics-lib/master] Attempt to fix non-terminating DocTor runs.
karsten at torproject.org
karsten at torproject.org
Sun Mar 11 06:57:12 UTC 2012
commit 40ce59909938fd9cf8e9fd31079ad8e20317fb92
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Sun Mar 11 07:54:16 2012 +0100
Attempt to fix non-terminating DocTor runs.
Some DocTor runs had download threads running into a NullPointerException
when delivering their results. If such a thread was the last running
download thread, it failed to complete downloads and Java didn't
terminate.
---
.../descriptor/impl/DownloadCoordinatorImpl.java | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/org/torproject/descriptor/impl/DownloadCoordinatorImpl.java b/src/org/torproject/descriptor/impl/DownloadCoordinatorImpl.java
index 4224b0e..87256a4 100644
--- a/src/org/torproject/descriptor/impl/DownloadCoordinatorImpl.java
+++ b/src/org/torproject/descriptor/impl/DownloadCoordinatorImpl.java
@@ -207,7 +207,8 @@ public class DownloadCoordinatorImpl implements DownloadCoordinator {
}
if (response.getDescriptorType().equals("consensus")) {
this.requestingConsensuses.remove(nickname);
- if (response.getResponseCode() == 200) {
+ if (response.getResponseCode() == 200 &&
+ response.getDescriptors() != null) {
if (this.includeCurrentReferencedVotes) {
/* TODO Only add votes if the consensus is not older than one
* hour. Or does that make no sense? */
More information about the tor-commits
mailing list