|
@@ -1321,7 +1321,8 @@ do_hup(void)
|
|
|
dmalloc_log_changed(0, 1, 0, 0);
|
|
|
#endif
|
|
|
|
|
|
- log_notice(LD_GENERAL,"Received reload signal (hup). Reloading config.");
|
|
|
+ log_notice(LD_GENERAL,"Received reload signal (hup). Reloading config and "
|
|
|
+ "resetting internal state.");
|
|
|
if (accounting_is_enabled(options))
|
|
|
accounting_record_bandwidth_usage(time(NULL), get_or_state());
|
|
|
|
|
@@ -1329,13 +1330,18 @@ do_hup(void)
|
|
|
routerlist_reset_warnings();
|
|
|
addressmap_clear_transient();
|
|
|
|
|
|
-
|
|
|
- if (options_init_from_torrc(0, NULL) < 0) {
|
|
|
- log_err(LD_CONFIG,"Reading config failed--see warnings above. "
|
|
|
- "For usage, try -h.");
|
|
|
- return -1;
|
|
|
+ if (options->ReloadTorrcOnSIGHUP) {
|
|
|
+
|
|
|
+ if (options_init_from_torrc(0, NULL) < 0) {
|
|
|
+ log_err(LD_CONFIG,"Reading config failed--see warnings above. "
|
|
|
+ "For usage, try -h.");
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ options = get_options();
|
|
|
+ } else {
|
|
|
+ log_notice(LD_GENERAL, "Not reloading config file: the controller told "
|
|
|
+ "us not to.");
|
|
|
}
|
|
|
- options = get_options();
|
|
|
if (authdir_mode_handles_descs(options, -1)) {
|
|
|
|
|
|
if (dirserv_load_fingerprint_file() < 0) {
|