Skip to content

Commit

Permalink
Fix issue openresty#78
Browse files Browse the repository at this point in the history
  • Loading branch information
supernev committed Aug 15, 2018
1 parent 0670f3e commit 29d5c2f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/resty/mysql.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ local error = error
local tonumber = tonumber


if not ngx.config
or not ngx.config.ngx_lua_version
or ngx.config.ngx_lua_version < 9011
then
error("ngx_lua 0.9.11+ required")
if ngx.config.subsystem == "http" then
if not ngx.config
or not ngx.config.ngx_lua_version
or ngx.config.ngx_lua_version < 9011
then
error("ngx_lua 0.9.11+ required")
end
end


Expand Down

0 comments on commit 29d5c2f

Please sign in to comment.