Added missing expiry changing.

This commit is contained in:
Alexander Andreev 2023-01-12 04:40:54 +04:00
parent f9154ab02f
commit f3e68f4c41
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -54,6 +54,7 @@ func (imcdb *InMemoryCaptchaDB) GetExpiry() time.Duration {
// SetExpiry changes an expiry duration to a new one.
func (imcdb *InMemoryCaptchaDB) SetExpiry(expiry time.Duration) {
imcdb.expiry = expiry
if expiry < captcha.DefaultExpiredScanInterval {
imcdb.expiryScanInterval = expiry
} else {