Commit 9f2a2507 authored by astaxie's avatar astaxie

fmt it and remove the init var

parent be60f474
......@@ -53,18 +53,17 @@ import (
)
const (
// PreSignal is the position to add filter before signal
// PreSignal is the position to add filter before signal
PreSignal = iota
// PostSignal is the position to add filter after signal
// PostSignal is the position to add filter after signal
PostSignal
// StateInit represent the application inited
// StateInit represent the application inited
StateInit
// StateRunning represent the application is running
// StateRunning represent the application is running
StateRunning
// StateShuttingDown represent the application is shutting down
// StateShuttingDown represent the application is shutting down
StateShuttingDown
// StateTerminate represent the application is killed
// StateTerminate represent the application is killed
StateTerminate
)
......@@ -75,24 +74,20 @@ var (
socketPtrOffsetMap map[string]uint
runningServersForked bool
// DefaultReadTimeOut is the HTTP read timeout
// DefaultReadTimeOut is the HTTP read timeout
DefaultReadTimeOut time.Duration
// DefaultWriteTimeOut is the HTTP Write timeout
// DefaultWriteTimeOut is the HTTP Write timeout
DefaultWriteTimeOut time.Duration
// DefaultMaxHeaderBytes is the Max HTTP Herder size, default is 0, no limit
// 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 is the shutdown server's timeout. default is 60s
DefaultTimeout = 60 * time.Second
isChild bool
isChild bool
socketOrder string
once sync.Once
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)")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment