mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
les: short circuit in the unregister if peer is not registered (#19644)
This commit is contained in:
parent
58497f46bd
commit
f2612ac948
@ -193,7 +193,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 New Issue
Block a user