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.
This commit is contained in:
Harshavardhana 2020-06-11 08:05:25 -07:00 committed by GitHub
parent b1845c6c83
commit ff94b1b0a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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)