From 64a0f8cfc78004495bb787e8e6ce74ba642a42d8 Mon Sep 17 00:00:00 2001 From: Yan Minari Date: Sat, 12 Jan 2019 17:05:41 -0200 Subject: [PATCH] Add fallback lock when request fails Signed-off-by: Yan Minari --- lua/groupbutler/utilities.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/groupbutler/utilities.lua b/lua/groupbutler/utilities.lua index 61349ef0d..afb886e08 100644 --- a/lua/groupbutler/utilities.lua +++ b/lua/groupbutler/utilities.lua @@ -283,6 +283,8 @@ function _M:cache_adminlist(chat_id) if not ok then if err.retry_after then red:setex(global_lock, err.retry_after, "") + else + red:setex(global_lock, 30, "") end self:metric_incr("api_getchatadministrators_error_count") return false, err