Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
917a6040
Commit
917a6040
authored
Apr 02, 2018
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httpserver: Ignore ErrServerClosed when closing server
parent
b33b24fc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
caddy.go
caddy.go
+1
-1
caddyhttp/httpserver/server.go
caddyhttp/httpserver/server.go
+3
-0
No files found.
caddy.go
View file @
917a6040
...
@@ -798,7 +798,7 @@ func startServers(serverList []Server, inst *Instance, restartFds map[string]res
...
@@ -798,7 +798,7 @@ func startServers(serverList []Server, inst *Instance, restartFds map[string]res
continue
continue
}
}
if
strings
.
Contains
(
err
.
Error
(),
"use of closed network connection"
)
{
if
strings
.
Contains
(
err
.
Error
(),
"use of closed network connection"
)
{
// this error is normal when closing the listener
// this error is normal when closing the listener
; see https://github.com/golang/go/issues/4373
continue
continue
}
}
log
.
Println
(
err
)
log
.
Println
(
err
)
...
...
caddyhttp/httpserver/server.go
View file @
917a6040
...
@@ -319,6 +319,9 @@ func (s *Server) Serve(ln net.Listener) error {
...
@@ -319,6 +319,9 @@ func (s *Server) Serve(ln net.Listener) error {
}
}
err
:=
s
.
Server
.
Serve
(
ln
)
err
:=
s
.
Server
.
Serve
(
ln
)
if
err
==
http
.
ErrServerClosed
{
err
=
nil
// not an error worth reporting since closing a server is intentional
}
if
s
.
quicServer
!=
nil
{
if
s
.
quicServer
!=
nil
{
s
.
quicServer
.
Close
()
s
.
quicServer
.
Close
()
}
}
...
...
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