From 509700eddbd620b588e7634f302be3c88d1470dc Mon Sep 17 00:00:00 2001
From: Darien Raymond <admin@v2ray.com>
Date: Mon, 30 Jan 2017 21:37:50 +0100
Subject: [PATCH] typo

---
 app/proxyman/inbound/dynamic.go | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/proxyman/inbound/dynamic.go b/app/proxyman/inbound/dynamic.go
index 351fc08f..05dd2911 100644
--- a/app/proxyman/inbound/dynamic.go
+++ b/app/proxyman/inbound/dynamic.go
@@ -76,15 +76,16 @@ func (h *DynamicInboundHandler) waitAnyCloseWorkers(ctx context.Context, cancel
 func (h *DynamicInboundHandler) refresh() error {
 	h.lastRefresh = time.Now()
 
-	timeout := time.Minute * time.Duration(h.receiverConfig.AllocationStrategy.GetRefreshValue())
+	timeout := time.Minute * time.Duration(h.receiverConfig.AllocationStrategy.GetRefreshValue()) * 2
+	concurrency := h.receiverConfig.AllocationStrategy.GetConcurrencyValue()
 	ctx, cancel := context.WithTimeout(h.ctx, timeout)
-	workers := make([]worker, 0, h.receiverConfig.AllocationStrategy.GetConcurrencyValue())
+	workers := make([]worker, 0, concurrency)
 
 	address := h.receiverConfig.Listen.AsAddress()
 	if address == nil {
 		address = v2net.AnyIP
 	}
-	for i := uint32(0); i < h.receiverConfig.AllocationStrategy.GetConcurrencyValue(); i++ {
+	for i := uint32(0); i < concurrency; i++ {
 		port := h.allocatePort()
 		p, err := proxy.CreateInboundHandler(ctx, h.proxyConfig)
 		if err != nil {