mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
api: Fix registering of s3 endpoint peers properly (#4159)
We need to have local peer initialized properly
for listen bucket to work, current code did initialize
properly but the resulting code was initializing
peer on a wrong target v/s what listen bucket expected
it to be.
This regression came in de204a0a52
Fixes #4158
This commit is contained in:
parent
f1d7780167
commit
df346753e1
@ -19,7 +19,6 @@ package cmd
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net"
|
||||
"path"
|
||||
"sync"
|
||||
|
||||
@ -42,12 +41,8 @@ type s3Peers []s3Peer
|
||||
// slice. The urls slice is assumed to be non-empty and free of nil
|
||||
// values.
|
||||
func makeS3Peers(endpoints EndpointList) (s3PeerList s3Peers) {
|
||||
thisPeer := globalMinioAddr
|
||||
if globalMinioHost == "" {
|
||||
thisPeer = net.JoinHostPort("localhost", globalMinioPort)
|
||||
}
|
||||
s3PeerList = append(s3PeerList, s3Peer{
|
||||
thisPeer,
|
||||
globalMinioAddr,
|
||||
&localBucketMetaState{ObjectAPI: newObjectLayerFn},
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user