chore(lint): upgrade golangci-lint to v1.47.2
- Fix Slowloris attacks on HTTP servers - Force set default of 5 minutes for pprof read timeout - Change `ShutdownTimeout` to time.Duration since it cannot be set to 0
This commit is contained in:
@@ -11,7 +11,12 @@ import (
|
||||
// The done channel has an error written to when the HTTP server
|
||||
// is terminated, and can be nil or not nil.
|
||||
func (s *Server) Run(ctx context.Context, ready chan<- struct{}, done chan<- struct{}) {
|
||||
server := http.Server{Addr: s.address, Handler: s.handler}
|
||||
server := http.Server{
|
||||
Addr: s.address,
|
||||
Handler: s.handler,
|
||||
ReadHeaderTimeout: s.readHeaderTimeout,
|
||||
ReadTimeout: s.readTimeout,
|
||||
}
|
||||
|
||||
crashed := make(chan struct{})
|
||||
shutdownDone := make(chan struct{})
|
||||
|
||||
Reference in New Issue
Block a user