Removed unnecessary guard around delete().
This commit is contained in:
parent
fcb656d4ea
commit
f9154ab02f
@ -102,10 +102,8 @@ func (imcdb *InMemoryCaptchaDB) IsSolved(id captcha.ID) bool {
|
|||||||
func (imcdb *InMemoryCaptchaDB) Remove(id captcha.ID) {
|
func (imcdb *InMemoryCaptchaDB) Remove(id captcha.ID) {
|
||||||
imcdb.Lock()
|
imcdb.Lock()
|
||||||
defer imcdb.Unlock()
|
defer imcdb.Unlock()
|
||||||
if _, ok := imcdb.db[id]; ok {
|
|
||||||
delete(imcdb.db, id)
|
delete(imcdb.db, id)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// cleanExpired removes expired CAPTCHAs in a loop.
|
// cleanExpired removes expired CAPTCHAs in a loop.
|
||||||
func (imcdb *InMemoryCaptchaDB) cleanExpired() {
|
func (imcdb *InMemoryCaptchaDB) cleanExpired() {
|
||||||
|
Loading…
Reference in New Issue
Block a user