mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2026-08-22 15:33:27 +08:00
update segment size on gc
This commit is contained in:
@@ -112,6 +112,7 @@ func (mab *memoryAddrBook) gc() {
|
||||
delete(s.addrs, p)
|
||||
}
|
||||
}
|
||||
atomic.StoreUint32(&s.size, uint32(len(s.addrs)))
|
||||
s.lk.Unlock()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user