From eca07187cf87c66d46ed5bf2ea2c644c9807d715 Mon Sep 17 00:00:00 2001 From: spacewander Date: Thu, 5 May 2022 18:06:27 +0800 Subject: [PATCH] feat: don't throw an error log when running in stream subsys Signed-off-by: spacewander --- lib/resty/logger/socket.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resty/logger/socket.lua b/lib/resty/logger/socket.lua index 0ef8bef..fc0cc0e 100644 --- a/lib/resty/logger/socket.lua +++ b/lib/resty/logger/socket.lua @@ -29,7 +29,7 @@ local _M = new_tab(0, 5) local is_exiting if not ngx.config or not ngx.config.ngx_lua_version - or ngx.config.ngx_lua_version < 9003 then + or (ngx.config.subsystem ~= "stream" and ngx.config.ngx_lua_version < 9003) then is_exiting = function() return false end