We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ce3469 commit 4829951Copy full SHA for 4829951
http_backend.go
@@ -66,11 +66,7 @@ type LimitRule struct {
66
67
// Init initializes the private members of LimitRule
68
func (r *LimitRule) Init() error {
69
- waitChanSize := 1
70
- if r.Parallelism > 1 {
71
- waitChanSize = r.Parallelism
72
- }
73
- r.waitChan = make(chan bool, waitChanSize)
+ r.waitChan = make(chan bool, max(r.Parallelism, 1))
74
hasPattern := false
75
if r.DomainRegexp != "" {
76
c, err := regexp.Compile(r.DomainRegexp)
0 commit comments