mirror of
https://github.com/zhufuyi/sponge.git
synced 2025-11-01 21:12:54 +08:00
modify timeout settings
This commit is contained in:
@@ -3,7 +3,6 @@ package initial
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/zhufuyi/sponge/pkg/app"
|
||||
"github.com/zhufuyi/sponge/pkg/logger"
|
||||
@@ -25,8 +24,6 @@ func CreateServices() []app.IServer {
|
||||
httpAddr := ":" + strconv.Itoa(cfg.HTTP.Port)
|
||||
httpRegistry, httpInstance := registerService("http", cfg.App.Host, cfg.HTTP.Port)
|
||||
httpServer := server.NewHTTPServer_pbExample(httpAddr,
|
||||
server.WithHTTPReadTimeout(time.Second*time.Duration(cfg.HTTP.ReadTimeout)),
|
||||
server.WithHTTPWriteTimeout(time.Second*time.Duration(cfg.HTTP.WriteTimeout)),
|
||||
server.WithHTTPRegistry(httpRegistry, httpInstance),
|
||||
server.WithHTTPIsProd(cfg.App.Env == "prod"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user