[or-cvs] [ernie/master 3/3] Close database connection as soon as we're done importing descriptors.
karsten at torproject.org
karsten at torproject.org
Mon May 31 08:28:47 UTC 2010
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Mon, 31 May 2010 10:25:12 +0200
Subject: Close database connection as soon as we're done importing descriptors.
Commit: 2050044b03fd0b0bdfb9608ef67eb79e210b0cf9
---
src/Main.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Main.java b/src/Main.java
index f1ace5f..7bf1c66 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -114,6 +114,11 @@ public class Main {
}
}
+ // Close database connection (if active)
+ if (rddi != null) {
+ rddi.closeConnection();
+ }
+
// Write output to disk that only depends on relay descriptors
if (chc != null) {
chc.writeStatusWebsite();
@@ -187,11 +192,6 @@ public class Main {
// Remove lock file
lf.releaseLock();
- // Close database connection (if active)
- if (config.getWriteRelayDescriptorDatabase()) {
- rddi.closeConnection();
- }
-
logger.info("Terminating ERNIE.");
}
}
--
1.6.5
More information about the tor-commits
mailing list