From: Vsevolod Stakhov Date: Mon, 22 Nov 2021 11:01:49 +0000 (+0000) Subject: [Minor] Fix data flow X-Git-Tag: 3.2~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4234ed52ba22ab5e308170959e9557f8f35df273;p=thirdparty%2Frspamd.git [Minor] Fix data flow --- diff --git a/src/plugins/lua/mx_check.lua b/src/plugins/lua/mx_check.lua index a7ea7aee74..2c9fcb3e79 100644 --- a/src/plugins/lua/mx_check.lua +++ b/src/plugins/lua/mx_check.lua @@ -140,11 +140,13 @@ local function mx_check(task) mxes[name].checked = true mxes[name].working = true valid = true + if settings.wait_for_greeting then + conn:add_write(function(_) + conn:close() + end, string.format('QUIT%s', CRLF)) + end end check_results(mxes) - conn:add_write(function(_) - conn:close() - end, string.format('QUIT%s', CRLF)) end local function on_connect_cb(conn) if err then