diff --git a/transport/control.go b/transport/control.go index 6629ce7b..464bf10a 100644 --- a/transport/control.go +++ b/transport/control.go @@ -104,9 +104,13 @@ type quotaPool struct { // newQuotaPool creates a quotaPool which has quota q available to consume. func newQuotaPool(q int) *quotaPool { - qb := "aPool{c: make(chan int, 1)} + qb := "aPool{ + c: make(chan int, 1), + } if q > 0 { qb.c <- q + } else { + qb.quota = q } return qb }