Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
e8fe859a
Commit
e8fe859a
authored
Dec 09, 2015
by
nkbai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式调整
parent
82e0105d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
grace.go
grace/grace.go
+13
-13
No files found.
grace/grace.go
View file @
e8fe859a
...
...
@@ -53,18 +53,18 @@ 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,25 +75,25 @@ 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 is the shutdown server's timeout. default is 60s
DefaultTimeout
time
.
Duration
isChild
bool
isChild
bool
socketOrder
string
once
sync
.
Once
=
sync
.
Once
{}
once
sync
.
Once
)
func
init
()
{
DefaultMaxHeaderBytes
=
0
DefaultTimeout
=
60
*
time
.
Second
}
func
onceInit
(){
func
onceInit
()
{
regLock
=
&
sync
.
Mutex
{}
flag
.
BoolVar
(
&
isChild
,
"graceful"
,
false
,
"listen on open fd (after forking)"
)
flag
.
StringVar
(
&
socketOrder
,
"socketorder"
,
""
,
"previous initialization order - used when more than one listener was started"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment