diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-03-14 15:22:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-03-25 16:35:34 -0400 |
commit | a8ca464cee14ad8d0782f626c7f36216dba2e400 (patch) | |
tree | b478dc51350e53e2cf3cf08be67c9990dfe351e6 /src/lib/pubsub | |
parent | 47de9c7b0a828de7fb8129413db70bc4e4ecac6d (diff) | |
download | tor-a8ca464cee14ad8d0782f626c7f36216dba2e400.tar.gz tor-a8ca464cee14ad8d0782f626c7f36216dba2e400.zip |
Log warning messages _before_ exiting because of earlier dcfg failure
This helps diagnostics.
Diffstat (limited to 'src/lib/pubsub')
-rw-r--r-- | src/lib/pubsub/pubsub_build.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/pubsub/pubsub_build.c b/src/lib/pubsub/pubsub_build.c index 64cdcc1d57..1dc20f51f4 100644 --- a/src/lib/pubsub/pubsub_build.c +++ b/src/lib/pubsub/pubsub_build.c @@ -281,11 +281,14 @@ pubsub_builder_finalize(pubsub_builder_t *builder, dispatch_t *dispatcher = NULL; tor_assert_nonfatal(builder->n_connectors == 0); - if (builder->n_errors) + if (pubsub_builder_check(builder) < 0) goto err; - if (pubsub_builder_check(builder) < 0) + if (builder->n_errors) { + log_warn(LD_GENERAL, "At least one error occurred previously when " + "configuring the dispatcher."); goto err; + } dispatcher = dispatch_new(builder->cfg); |