isEndpointConnected should take local disk inputs (#9803)

PR #9801 while it is correct, the loop isEndpointConnected()
was changed to rely on endpoint.String() which has the host
information as well, which is not correct value as input to
detect if the disk is down or up, if endpoint is local use
its local path value instead.
master
Harshavardhana 4 years ago committed by GitHub
parent b1845c6c83
commit ff94b1b0a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      cmd/xl-sets.go

@ -190,7 +190,11 @@ func (s *xlSets) connectDisks() {
var wg sync.WaitGroup
diskMap := s.getDiskMap()
for _, endpoint := range s.endpoints {
if isEndpointConnected(diskMap, endpoint.String()) {
diskPath := endpoint.String()
if endpoint.IsLocal {
diskPath = endpoint.Path
}
if isEndpointConnected(diskMap, diskPath) {
continue
}
wg.Add(1)

Loading…
Cancel
Save