fmt it and remove the init var

This commit is contained in:
astaxie 2015-12-09 23:47:44 +08:00
parent be60f47488
commit 9f2a2507fd
1 changed files with 13 additions and 18 deletions

View File

@ -57,7 +57,6 @@ const (
PreSignal = iota
// PostSignal is the position to add filter after signal
PostSignal
// StateInit represent the application inited
StateInit
// StateRunning represent the application is running
@ -82,17 +81,13 @@ var (
// DefaultMaxHeaderBytes is the Max HTTP Herder size, default is 0, no limit
DefaultMaxHeaderBytes int
// DefaultTimeout is the shutdown server's timeout. default is 60s
DefaultTimeout time.Duration
DefaultTimeout = 60 * time.Second
isChild bool
socketOrder string
once sync.Once
)
func init() {
DefaultMaxHeaderBytes = 0
DefaultTimeout = 60 * time.Second
}
func onceInit() {
regLock = &sync.Mutex{}
flag.BoolVar(&isChild, "graceful", false, "listen on open fd (after forking)")