-(home): fix duplicate check when adding a new ClientHost

This commit is contained in:
Andrey Meshkov 2019-12-23 16:20:12 +03:00
parent b4f4111609
commit ec7a62e123
1 changed files with 2 additions and 2 deletions

View File

@ -455,8 +455,8 @@ func (clients *clientsContainer) AddHost(ip, host string, source clientSource) (
clients.lock.Lock() clients.lock.Lock()
defer clients.lock.Unlock() defer clients.lock.Unlock()
// check index // check existing clients first
_, ok := clients.idIndex[ip] _, ok := clients.Find(ip)
if ok { if ok {
return false, nil return false, nil
} }