Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'app.go')
-rw-r--r--app.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/app.go b/app.go
index b516ab15..3df55b3e 100644
--- a/app.go
+++ b/app.go
@@ -359,7 +359,10 @@ func (a *theApp) buildHandlerPipeline() (http.Handler, error) {
func (a *theApp) Run() {
var wg sync.WaitGroup
- limiter := netutil.NewLimiter(a.config.General.MaxConns)
+ var limiter *netutil.Limiter
+ if a.config.General.MaxConns > 0 {
+ limiter = netutil.NewLimiter(a.config.General.MaxConns)
+ }
// Use a common pipeline to use a single instance of each handler,
// instead of making two nearly identical pipelines