mirror of https://github.com/grpc/grpc-go.git
small fix
This commit is contained in:
parent
bdccc897b0
commit
3aeeefd6e7
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue