|
@ -4,14 +4,15 @@ |
|
|
package core |
|
|
package core |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
|
|
|
"time" |
|
|
|
|
|
|
|
|
"github.com/fvbock/endless" |
|
|
"github.com/fvbock/endless" |
|
|
"github.com/gin-gonic/gin" |
|
|
"github.com/gin-gonic/gin" |
|
|
"time" |
|
|
|
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func initServer(address string, router *gin.Engine) server { |
|
|
func initServer(address string, router *gin.Engine) server { |
|
|
s := endless.NewServer(address, router) |
|
|
s := endless.NewServer(address, router) |
|
|
s.ReadHeaderTimeout = 10 * time.Millisecond |
|
|
|
|
|
|
|
|
s.ReadHeaderTimeout = 10 * time.Second |
|
|
s.WriteTimeout = 10 * time.Second |
|
|
s.WriteTimeout = 10 * time.Second |
|
|
s.MaxHeaderBytes = 1 << 20 |
|
|
s.MaxHeaderBytes = 1 << 20 |
|
|
return s |
|
|
return s |
|
|