Hello everyone,

i use a simple lua script in Haproxy ( HA-Proxy version 1.7.9-1~bpo8+1 2017/08/24 ):

---------

function add_delay(txn)
    local default = 200
    local delay = txn:get_var("req.delay")
    if delay ~= nil then
        core.msleep(delay)
    else
        core.msleep(default)
    end
end

core.register_action("add_delay", { "http-req" }, add_delay)

---------

it works well but if a client close (abort) its connection in the middle of a transaction i have a "Lua function 'add_delay': yield not allowed." message in the logs.

I would like to know if i can do something to avoid the message or if i have to leave it as it is.

btw is it possible to access an acl in lua ?  Something like [acl mydom hdr(host) mydom.com] => [txn:acl("mydom")] . Or do i have to write the test enterily in lua with the fetches function.

Thanks !


Reply via email to