From 343b28fb8074c36e833232a6e4a61c51a96eb070 Mon Sep 17 00:00:00 2001 From: lan Date: Mon, 16 Jan 2023 22:58:50 +0800 Subject: [PATCH] =?UTF-8?q?update:=E5=A2=9E=E5=BC=BAiplimit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/depends.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core/depends.py b/core/depends.py index 6391139..8b79f99 100644 --- a/core/depends.py +++ b/core/depends.py @@ -36,6 +36,7 @@ class IPRateLimit: def add_ip(self, ip): ip_info = self.ips.get(ip, {'count': 0, 'time': datetime.now()}) ip_info['count'] += 1 + ip_info['time'] = datetime.now() self.ips[ip] = ip_info return ip_info['count']