Browse Source

Merge pull request #790 from liqianjie/master

不通过本地nginx代理,直接访问时,10ms会导致概率性请求失败
main
奇淼(piexlmax 3 years ago
committed by GitHub
parent
commit
0df1a4699a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      server/core/server_other.go

5
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

Loading…
Cancel
Save