Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/imunify360-webshield/lualib/resty/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/imunify360-webshield/lualib/resty/core/coroutine.lua
local base = require "resty.core.base"
local get_request = base.get_request

do
    local keys = {'create', 'yield', 'resume', 'status', 'wrap'}
    local errmsg = base.get_errmsg_ptr()
    local get_raw_phase = ngx.get_raw_phase

    for _, key in ipairs(keys) do
        local std = coroutine['_' .. key]
        local ours = coroutine['__' .. key]
        coroutine[key] = function (...)
            local r = get_request()
            if r ~= nil then
                local ctx = get_raw_phase(r, errmsg)
                if ctx ~= 0x020 and ctx ~= 0x040 then
                    return ours(...)
                end
            end
            return std(...)
        end
    end

    package.loaded.coroutine = coroutine
end

return {
    version = base.version
}

F1le Man4ger