les: fixed freeClientPool test

This commit is contained in:
Zsolt Felfoldi 2019-01-19 11:12:16 +01:00
parent b3f60e4ab7
commit 98228dcab0

View file

@ -142,6 +142,7 @@ func (f *freeClientPool) connect(address, id string) bool {
} }
f.disconnPool.Remove(e.index) f.disconnPool.Remove(e.index)
e.connected = true e.connected = true
e.id = id
f.connPool.Push(e, e.linUsage) f.connPool.Push(e, e.linUsage)
if f.connPool.Size()+f.disconnPool.Size() > f.totalLimit { if f.connPool.Size()+f.disconnPool.Size() > f.totalLimit {
f.disconnPool.Pop() f.disconnPool.Pop()