commit a8ca464cee14ad8d0782f626c7f36216dba2e400 Author: Nick Mathewson nickm@torproject.org Date: Thu Mar 14 15:22:19 2019 -0400
Log warning messages _before_ exiting because of earlier dcfg failure
This helps diagnostics. --- src/lib/pubsub/pubsub_build.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/lib/pubsub/pubsub_build.c b/src/lib/pubsub/pubsub_build.c index 64cdcc1d5..1dc20f51f 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);