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/fuzzy_storage.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/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index cd0266844..0636aeff7 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -3017,8 +3017,6 @@ start_fuzzy (struct rspamd_worker *worker) g_array_free (ctx->updates_pending, TRUE); } - rspamd_log_close (worker->srv->logger); - if (ctx->peer_fd != -1) { if (worker->index == 0) { event_del (&ctx->peer_ev); @@ -3032,5 +3030,7 @@ start_fuzzy (struct rspamd_worker *worker) REF_RELEASE (ctx->cfg); + rspamd_log_close (worker->srv->logger, TRUE); + exit (EXIT_SUCCESS); } |