mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
les: short circuit in the unregister if peer is not registered
This commit is contained in:
parent
008d250e3c
commit
562336c97c
1 changed files with 4 additions and 0 deletions
|
|
@ -166,7 +166,11 @@ func (f *freeClientPool) disconnect(address string) {
|
||||||
if f.closed {
|
if f.closed {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// Short circuit if the peer hasn't been registered.
|
||||||
e := f.addressMap[address]
|
e := f.addressMap[address]
|
||||||
|
if e == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
now := f.clock.Now()
|
now := f.clock.Now()
|
||||||
if !e.connected {
|
if !e.connected {
|
||||||
log.Debug("Client already disconnected", "address", address)
|
log.Debug("Client already disconnected", "address", address)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue