Commit f2612ac9 authored by gary rong's avatar gary rong Committed by Péter Szilágyi

les: short circuit in the unregister if peer is not registered (#19644)

parent 58497f46
......@@ -193,7 +193,11 @@ func (f *freeClientPool) disconnect(address string) {
if f.closed {
return
}
// Short circuit if the peer hasn't been registered.
e := f.addressMap[address]
if e == nil {
return
}
now := f.clock.Now()
if !e.connected {
log.Debug("Client already disconnected", "address", address)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment