aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorChris Ball <chris@printf.net>2010-07-31 22:35:20 -0400
committerNick Mathewson <nickm@torproject.org>2010-08-02 12:14:01 -0400
commit73a4c0690edd49ea8fec2b8034bc2b0b681acdb0 (patch)
tree1e8b0b4e951dd25f33722dc8c1667d9a197c0087 /src/or/config.c
parent9ffa9779819bfba33a6a9fdd888aeb52c99d00d9 (diff)
downloadtor-73a4c0690edd49ea8fec2b8034bc2b0b681acdb0.tar
tor-73a4c0690edd49ea8fec2b8034bc2b0b681acdb0.tar.gz
Bug #919: Don't rebind ports if we receive SIGHUP while hibernating.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 20ae9f072..46066b186 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -950,10 +950,12 @@ options_act_reversible(or_options_t *old_options, char **msg)
}
/* Launch the listeners. (We do this before we setuid, so we can bind to
- * ports under 1024.) */
- if (retry_all_listeners(replaced_listeners, new_listeners) < 0) {
- *msg = tor_strdup("Failed to bind one of the listener ports.");
- goto rollback;
+ * ports under 1024.) We don't want to rebind if we're hibernating. */
+ if (!we_are_hibernating()) {
+ if (retry_all_listeners(replaced_listeners, new_listeners) < 0) {
+ *msg = tor_strdup("Failed to bind one of the listener ports.");
+ goto rollback;
+ }
}
}