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