* 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

@@ -1,16 +1,16 @@
package command
import (
"crypto/tls"
"fmt"
"net/http"
"os"
"strings"
"time"
stats_collect "github.com/seaweedfs/seaweedfs/weed/stats"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/pb"
stats_collect "github.com/seaweedfs/seaweedfs/weed/stats"
"github.com/seaweedfs/seaweedfs/weed/util"
"github.com/seaweedfs/seaweedfs/weed/util/grace"
)
@@ -358,3 +358,13 @@ func runServer(cmd *Command, args []string) bool {
select {}
}
func newHttpServer(h http.Handler, tlsConfig *tls.Config) *http.Server {
s := &http.Server{
Handler: h,
}
if tlsConfig != nil {
s.TLSConfig = tlsConfig.Clone()
}
return s
}