From 9b392a0601503b793143ef56dfed777ba72e3b04 Mon Sep 17 00:00:00 2001 From: astaxie Date: Wed, 3 Jul 2013 16:58:15 +0800 Subject: [PATCH] update to hotupdate's connet timeout --- beego.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/beego.go b/beego.go index 60fd4149..2b28c331 100644 --- a/beego.go +++ b/beego.go @@ -98,7 +98,11 @@ func (app *App) Run() { err = fcgi.Serve(l, app.Handlers) } else { if EnbaleHotUpdate { - server := &http.Server{Handler: app.Handlers} + server := &http.Server{ + Handler: app.Handlers, + ReadTimeout: time.Duration(HttpServerTimeOut) * time.Second, + WriteTimeout: time.Duration(HttpServerTimeOut) * time.Second, + } laddr, err := net.ResolveTCPAddr("tcp", addr) if nil != err { BeeLogger.Fatal("ResolveTCPAddr:", err)