nil check
This commit is contained in:
@@ -266,7 +266,9 @@ func (p *SyncedPool) RemoveHost(host *RemoteHost) {
|
|||||||
defer p.mu.Unlock()
|
defer p.mu.Unlock()
|
||||||
|
|
||||||
h := p.remotes[host.Host]
|
h := p.remotes[host.Host]
|
||||||
|
if h != nil {
|
||||||
h.Close()
|
h.Close()
|
||||||
|
}
|
||||||
delete(p.remotes, host.Host)
|
delete(p.remotes, host.Host)
|
||||||
|
|
||||||
connectedRemotes.Set(float64(len(p.remotes)))
|
connectedRemotes.Set(float64(len(p.remotes)))
|
||||||
|
|||||||
Reference in New Issue
Block a user