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
0382146c
Commit
0382146c
authored
Jan 29, 2016
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the go vet for go tip
parent
1bf52e89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
config.go
config.go
+1
-1
server.go
grace/server.go
+7
-8
No files found.
config.go
View file @
0382146c
...
...
@@ -319,7 +319,7 @@ func LoadAppConfig(adapterName, configPath string) error {
}
if
!
utils
.
FileExists
(
absConfigPath
)
{
return
fmt
.
Errorf
(
"the target config file: %s don't exist
!
"
,
configPath
)
return
fmt
.
Errorf
(
"the target config file: %s don't exist"
,
configPath
)
}
if
absConfigPath
==
appConfigPath
{
...
...
grace/server.go
View file @
0382146c
...
...
@@ -90,16 +90,15 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string) (err error) {
addr
=
":https"
}
config
:=
&
tls
.
Config
{}
if
srv
.
TLSConfig
!=
nil
{
*
config
=
*
srv
.
TLSConfig
if
srv
.
TLSConfig
==
nil
{
srv
.
TLSConfig
=
&
tls
.
Config
{}
}
if
c
onfig
.
NextProtos
==
nil
{
c
onfig
.
NextProtos
=
[]
string
{
"http/1.1"
}
if
srv
.
TLSC
onfig
.
NextProtos
==
nil
{
srv
.
TLSC
onfig
.
NextProtos
=
[]
string
{
"http/1.1"
}
}
c
onfig
.
Certificates
=
make
([]
tls
.
Certificate
,
1
)
c
onfig
.
Certificates
[
0
],
err
=
tls
.
LoadX509KeyPair
(
certFile
,
keyFile
)
srv
.
TLSC
onfig
.
Certificates
=
make
([]
tls
.
Certificate
,
1
)
srv
.
TLSC
onfig
.
Certificates
[
0
],
err
=
tls
.
LoadX509KeyPair
(
certFile
,
keyFile
)
if
err
!=
nil
{
return
}
...
...
@@ -113,7 +112,7 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string) (err error) {
}
srv
.
tlsInnerListener
=
newGraceListener
(
l
,
srv
)
srv
.
GraceListener
=
tls
.
NewListener
(
srv
.
tlsInnerListener
,
c
onfig
)
srv
.
GraceListener
=
tls
.
NewListener
(
srv
.
tlsInnerListener
,
srv
.
TLSC
onfig
)
if
srv
.
isChild
{
process
,
err
:=
os
.
FindProcess
(
os
.
Getppid
())
...
...
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