mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-16 18:38:52 -07:00
-(home): fix duplicate check when adding a new ClientHost
This commit is contained in:
parent
b4f4111609
commit
ec7a62e123
@ -455,8 +455,8 @@ func (clients *clientsContainer) AddHost(ip, host string, source clientSource) (
|
||||
clients.lock.Lock()
|
||||
defer clients.lock.Unlock()
|
||||
|
||||
// check index
|
||||
_, ok := clients.idIndex[ip]
|
||||
// check existing clients first
|
||||
_, ok := clients.Find(ip)
|
||||
if ok {
|
||||
return false, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user