proxy to master uses http address

fix https://github.com/seaweedfs/seaweedfs/issues/4607
This commit is contained in:
chrislu 2023-07-04 11:45:21 -07:00
parent 2aa59ab37c
commit a315490f7d

View file

@ -225,7 +225,7 @@ func (ms *MasterServer) proxyToLeader(f http.HandlerFunc) http.HandlerFunc {
// get the current raft leader
leaderAddr, _ := ms.Topo.MaybeLeader()
raftServerLeader := string(leaderAddr)
raftServerLeader := leaderAddr.ToHttpAddress()
if raftServerLeader == "" {
f(w, r)
return