* Fix undefined http serve behaiver (#6943)

This commit is contained in:
zuzuviewer
2025-07-08 13:48:12 +08:00
committed by GitHub
parent 39b7e44fb5
commit 8fa1a69f8c
7 changed files with 62 additions and 61 deletions

View File

@@ -3,19 +3,19 @@ package command
import (
"context"
"fmt"
"github.com/seaweedfs/seaweedfs/weed/util/version"
"net/http"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/gorilla/mux"
"google.golang.org/grpc/reflection"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/pb"
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
"github.com/seaweedfs/seaweedfs/weed/security"
weed_server "github.com/seaweedfs/seaweedfs/weed/server"
"github.com/seaweedfs/seaweedfs/weed/util"
"google.golang.org/grpc/reflection"
"github.com/seaweedfs/seaweedfs/weed/util/version"
)
var (
@@ -144,11 +144,10 @@ func startMasterFollower(masterOptions MasterOptions) {
go ms.MasterClient.KeepConnectedToMaster(context.Background())
// start http server
httpS := &http.Server{Handler: r}
if masterLocalListener != nil {
go httpS.Serve(masterLocalListener)
go newHttpServer(r, nil).Serve(masterLocalListener)
}
go httpS.Serve(masterListener)
go newHttpServer(r, nil).Serve(masterListener)
select {}
}