mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
use original server address string as map key
This commit is contained in:
parent
4b5c0e3fa9
commit
daca2d22a5
|
@ -134,7 +134,7 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
|
|||
|
||||
masterPeers := make(map[string]pb.ServerAddress)
|
||||
for _, peer := range peers {
|
||||
masterPeers[peer.String()] = peer
|
||||
masterPeers[string(peer)] = peer
|
||||
}
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
|
|
@ -89,7 +89,7 @@ func (sa ServerAddresses) ToAddresses() (addresses []ServerAddress) {
|
|||
func (sa ServerAddresses) ToAddressMap() (addresses map[string]ServerAddress) {
|
||||
addresses = make(map[string]ServerAddress)
|
||||
for _, address := range sa.ToAddresses() {
|
||||
addresses[address.String()] = address
|
||||
addresses[string(address)] = address
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue