Sfoglia il codice sorgente

[Minor] Add timeout augmentation for external services/av plugins

tags/3.3
Vsevolod Stakhov 1 anno fa
parent
commit
08fb5403de
Nessun account collegato all'indirizzo email del committer
2 ha cambiato i file con 16 aggiunte e 0 eliminazioni
  1. 8
    0
      src/plugins/lua/antivirus.lua
  2. 8
    0
      src/plugins/lua/external_services.lua

+ 8
- 0
src/plugins/lua/antivirus.lua Vedi File

@@ -197,6 +197,14 @@ if opts and type(opts) == 'table' then
t.type = 'normal'
end

t.augmentations = {}

if type(m.timeout) == 'number' then
-- Here, we ignore possible DNS timeout and timeout from multiple retries
-- as these situations are not usual nor likely for the antivirus module
table.insert(t.augmentations, string.format("timeout=%f", m.timeout))
end

local id = rspamd_config:register_symbol(t)

rspamd_config:register_symbol({

+ 8
- 0
src/plugins/lua/external_services.lua Vedi File

@@ -227,6 +227,14 @@ if opts and type(opts) == 'table' then
t.type = 'normal'
end

t.augmentations = {}

if type(m.timeout) == 'number' then
-- Here, we ignore possible DNS timeout and timeout from multiple retries
-- as these situations are not usual nor likely for the external_services module
table.insert(t.augmentations, string.format("timeout=%f", m.timeout))
end

local id = rspamd_config:register_symbol(t)

if m.symbol_fail then

Loading…
Annulla
Salva