diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-20 22:04:11 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-22 10:57:29 +0100 |
commit | 79a6671de054b5f03eb4a9cb9b8851d3e111a295 (patch) | |
tree | 755d03d767e3b0254ac0ba4611664940932b7655 /src/libserver/worker_util.c | |
parent | 7c4eb706c124806d254af6033c7023ee488b2c6c (diff) | |
download | rspamd-79a6671de054b5f03eb4a9cb9b8851d3e111a295.tar.gz rspamd-79a6671de054b5f03eb4a9cb9b8851d3e111a295.zip |
[Minor] Optimize the case when there are no finish events
Diffstat (limited to 'src/libserver/worker_util.c')
-rw-r--r-- | src/libserver/worker_util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index cc89c210b..bb15d0407 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -112,6 +112,11 @@ rspamd_worker_terminate_handlers (struct rspamd_worker *w) static ev_timer margin_call; static int nchecks = 0; + if (w->finish_actions->len == 0) { + /* Nothing to do */ + return; + } + actx = (struct rspamd_abstract_worker_ctx *)w->ctx; /* |