ratelimitfile: do a clean of the expired entries automatically

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3900 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-08-04 08:08:04 +00:00
parent 439513f65d
commit 904f520a7a

View File

@@ -55,6 +55,7 @@ class ratelimitfile extends ratelimit
file_put_contents ($file, $contents);
$lock->unlockRW ();
unset ($lock);
$this->clean ();
if (count ($contents) > $this->maxEntries)
{
if ($this->debug) echo "Ratelimiting for '$name'\n";