From 0267d4fcaee4cce682a44f79f332717abcfd2718 Mon Sep 17 00:00:00 2001 From: liqianjie <3745983@qq.com> Date: Fri, 5 Nov 2021 13:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E9=80=9A=E8=BF=87=E6=9C=AC=E5=9C=B0ng?= =?UTF-8?q?inx=E4=BB=A3=E7=90=86,=E7=9B=B4=E6=8E=A5=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E6=97=B6,10ms=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=A6=82=E7=8E=87?= =?UTF-8?q?=E6=80=A7=E8=AF=B7=E6=B1=82=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/server_other.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/core/server_other.go b/server/core/server_other.go index ce159fe3..75dc041c 100644 --- a/server/core/server_other.go +++ b/server/core/server_other.go @@ -4,14 +4,15 @@ package core import ( + "time" + "github.com/fvbock/endless" "github.com/gin-gonic/gin" - "time" ) func initServer(address string, router *gin.Engine) server { s := endless.NewServer(address, router) - s.ReadHeaderTimeout = 10 * time.Millisecond + s.ReadHeaderTimeout = 10 * time.Second s.WriteTimeout = 10 * time.Second s.MaxHeaderBytes = 1 << 20 return s