Skip to content

Commit

Permalink
Merge pull request #4 from huahua132/main
Browse files Browse the repository at this point in the history
context增加abort函数
  • Loading branch information
hanxi authored Nov 9, 2023
2 parents a70ca11 + 1ec7f68 commit 1fc8344
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lualib/wlua/context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ function M:next()
end
end

--中断调用,比如中间件验证失败
function M:abort()
self.index = #self.handlers + 1
end

-- M:send(text, status, content_type)
function M:send(...)
self.res:send(...)
Expand Down

0 comments on commit 1fc8344

Please sign in to comment.