les: fix removed condition

This commit is contained in:
Zsolt Felfoldi 2018-08-14 22:41:14 +02:00
parent b005cd5610
commit 19b3839580

View file

@ -321,7 +321,9 @@ func (pm *ProtocolManager) handle(p *peer) error {
p.lock.Lock() p.lock.Lock()
head := p.headInfo head := p.headInfo
p.lock.Unlock() p.lock.Unlock()
pm.fetcher.announce(p, head) if pm.fetcher != nil {
pm.fetcher.announce(p, head)
}
if p.poolEntry != nil { if p.poolEntry != nil {
pm.serverPool.registered(p.poolEntry) pm.serverPool.registered(p.poolEntry)