mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-21 23:41:01 +00:00
Fix memory leak
This commit is contained in:
parent
1ac27aeb82
commit
5c76febaa4
1 changed files with 3 additions and 2 deletions
|
@ -28,8 +28,9 @@ def setup(violations_threshold = 100):
|
||||||
|
|
||||||
|
|
||||||
def report(request_ip):
|
def report(request_ip):
|
||||||
banned[request_ip] = banned.get(request_ip, 0)
|
if active:
|
||||||
banned[request_ip] += 1
|
banned[request_ip] = banned.get(request_ip, 0)
|
||||||
|
banned[request_ip] += 1
|
||||||
|
|
||||||
def is_banned(request_ip):
|
def is_banned(request_ip):
|
||||||
# More than X offences?
|
# More than X offences?
|
||||||
|
|
Loading…
Reference in a new issue