]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix data flow
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 22 Nov 2021 11:01:49 +0000 (11:01 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 22 Nov 2021 11:01:49 +0000 (11:01 +0000)
src/plugins/lua/mx_check.lua

index a7ea7aee743baeb293ee887b3d8502eb6e40c4da..2c9fcb3e79d0970fc0fc421e2a0a0c9f648df312 100644 (file)
@@ -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