diff --git a/src/or/config.c b/src/or/config.c index b9051d23a7..cfc7952702 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -271,9 +271,6 @@ options_act(void) { if (options->command != CMD_RUN_TOR) return 0; - if (set_max_file_descriptors(options->MaxConn) < 0) - return -1; - mark_logs_temp(); /* Close current logs once new logs are open. */ if (config_init_logs(options, 0)<0) /* Configure the log(s) */ return -1; @@ -282,6 +279,9 @@ options_act(void) { close_temp_logs(); add_callback_log(LOG_NOTICE, LOG_ERR, control_event_logmsg); + if (set_max_file_descriptors(options->MaxConn) < 0) + return -1; + { smartlist_t *sl = smartlist_create(); for (cl = options->RedirectExit; cl; cl = cl->next) {