diff options
author | Mikhail Galanin <mgalanin@mimecast.com> | 2018-08-30 14:03:01 +0100 |
---|---|---|
committer | Mikhail Galanin <mgalanin@mimecast.com> | 2018-08-30 14:03:01 +0100 |
commit | 43d3cc3d8a4001c9cb65871a651fe81cbc6ee98e (patch) | |
tree | ec2a655a65f4dcc43a2359db69ad61b4a3bd528d /src/controller.c | |
parent | a7543072058055ff88698383967cf83f58fa663d (diff) | |
download | rspamd-43d3cc3d8a4001c9cb65871a651fe81cbc6ee98e.tar.gz rspamd-43d3cc3d8a4001c9cb65871a651fe81cbc6ee98e.zip |
[Minor] Log should not depend on config
When config is being closed, some destructors could be called, and that dtors could write into log. Hence, it is better to terminate config and only then close log. And log should not refer disposed config
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controller.c b/src/controller.c index 72220aa3c..6cb5eaa62 100644 --- a/src/controller.c +++ b/src/controller.c @@ -3855,7 +3855,6 @@ start_controller_worker (struct rspamd_worker *worker) rspamd_stat_close (); rspamd_http_router_free (ctx->http); - rspamd_log_close (worker->srv->logger); if (ctx->cached_password.len > 0) { m = (gpointer)ctx->cached_password.begin; @@ -3870,6 +3869,7 @@ start_controller_worker (struct rspamd_worker *worker) g_hash_table_unref (ctx->plugins); g_hash_table_unref (ctx->custom_commands); REF_RELEASE (ctx->cfg); + rspamd_log_close (worker->srv->logger, TRUE); exit (EXIT_SUCCESS); } |