This commit is contained in:
Raúl Kripalani 2018-08-31 13:23:02 +01:00
parent 81615c1df7
commit 039ee3a7b1

View File

@ -40,7 +40,7 @@ type memoryAddrBook struct {
func NewAddrBook() pstore.AddrBook {
return &memoryAddrBook{
addrs: make(map[peer.ID]addrSlice),
addrs: make(map[peer.ID]addrSlice),
subManager: NewAddrSubManager(),
}
}
@ -262,7 +262,7 @@ func NewAddrSubManager() *AddrSubManager {
func (mgr *AddrSubManager) removeSub(p peer.ID, s *addrSub) {
mgr.mu.Lock()
defer mgr.mu.Unlock()
subs := mgr.subs[p]
if len(subs) == 1 {
if subs[0] != s {