aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index d7f7209994..8823dae43f 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3966,7 +3966,8 @@ or_state_save(time_t now)
* to avoid redundant writes. */
entry_guards_update_state(global_state);
rep_hist_update_state(global_state);
- accounting_run_housekeeping(now);
+ if (accounting_is_enabled(get_options()))
+ accounting_run_housekeeping(now);
global_state->LastWritten = time(NULL);
tor_free(global_state->TorVersion);