From d34366aefcce940a044ce04e47b5dfd90d021a9e Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Mon, 20 Dec 2021 16:55:14 +0100 Subject: [PATCH] improve get_stale usage docs --- docker/nginx/libs/skynet/blocklist.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/nginx/libs/skynet/blocklist.lua b/docker/nginx/libs/skynet/blocklist.lua index 7b45fe28..6a447297 100644 --- a/docker/nginx/libs/skynet/blocklist.lua +++ b/docker/nginx/libs/skynet/blocklist.lua @@ -46,8 +46,9 @@ function _M.is_blocked(skylink) -- hash skylink before comparing it with blocklist local hash = require("skynet.skylink").hash(skylink) - -- we need to use get stale because we're using expiring when updating blocklist - -- and we want to make sure that we're blocking the skylink + -- we need to use get_stale because we are expiring previous + -- entries when the blocklist is reloading and we still want + -- to block them until the reloading is finished return ngx.shared.blocklist:get_stale(hash) == true end