From: Vsevolod Stakhov Date: Thu, 20 Jun 2019 21:04:11 +0000 (+0100) Subject: [Minor] Optimize the case when there are no finish events X-Git-Tag: 2.0~755^2~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=79a6671de054b5f03eb4a9cb9b8851d3e111a295;p=rspamd.git [Minor] Optimize the case when there are no finish events --- 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; /*