mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 16:54:15 -04:00
plugin/forward: close channels when connManager returns (#1727)
Close a bunch of channels, also change the test to just use a for loop with a counter.
This commit is contained in:
@@ -25,9 +25,7 @@ func TestProxyClose(t *testing.T) {
|
||||
state := request.Request{W: &test.ResponseWriter{}, Req: req}
|
||||
ctx := context.TODO()
|
||||
|
||||
repeatCnt := 1000
|
||||
for repeatCnt > 0 {
|
||||
repeatCnt--
|
||||
for i := 0; i < 100; i++ {
|
||||
p := NewProxy(s.Addr, nil /* no TLS */)
|
||||
p.start(hcDuration)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user