Skip to content

Commit

Permalink
Merge pull request #1695 from vincepri/runnable-group
Browse files Browse the repository at this point in the history
⚠️  Refactor manager to avoid race conditions and provide clean shutdown
  • Loading branch information
k8s-ci-robot authored Nov 4, 2021
2 parents 0a3dd2a + 612e9b2 commit 6c7c1d7
Show file tree
Hide file tree
Showing 8 changed files with 772 additions and 301 deletions.
16 changes: 16 additions & 0 deletions pkg/internal/httpserver/server.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package httpserver

import (
"net/http"
"time"
)

// New returns a new server with sane defaults.
func New(handler http.Handler) *http.Server {
return &http.Server{
Handler: handler,
MaxHeaderBytes: 1 << 20,
IdleTimeout: 90 * time.Second, // matches http.DefaultTransport keep-alive timeout
ReadHeaderTimeout: 32 * time.Second,
}
}
Loading

0 comments on commit 6c7c1d7

Please sign in to comment.