From a4e30941ffec68a75776fe0ee69abf177098ef9d Mon Sep 17 00:00:00 2001 From: Dayang Shen Date: Fri, 3 Jun 2022 13:07:36 +0800 Subject: [PATCH] Address comments --- rootfs/etc/nginx/lua/certificate.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/nginx/lua/certificate.lua b/rootfs/etc/nginx/lua/certificate.lua index 612184a2a..1f4757bfc 100644 --- a/rootfs/etc/nginx/lua/certificate.lua +++ b/rootfs/etc/nginx/lua/certificate.lua @@ -225,8 +225,8 @@ end function _M.set_cache_size(size) local cache, err = lrucache.new(size) - if err then - ngx.log(ngx.ERR, string.format("failed to create the certificate cache: %s", tostring(err))) + if not cache then + ngx.log(ngx.ERR, string.format("failed to create the certificate cache: %s", err)) end certificate_cache = cache end