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