未验证 提交 0df1a469 编写于 作者: Mr.奇淼('s avatar Mr.奇淼( 提交者: GitHub

Merge pull request #790 from liqianjie/master

不通过本地nginx代理,直接访问时,10ms会导致概率性请求失败
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册