projects/aports·blob master · refs

19 lines · 1.2 KiB

1Patch-Source: https://github.com/projectdiscovery/nuclei/commit/85723be139cfcd09825c10b271369ed102cbd7e8
2---
3diff --git a/pkg/protocols/http/request_test.go b/pkg/protocols/http/request_test.go
4index 2d16816833..d676022fe3 100644
5--- a/pkg/protocols/http/request_test.go
6+++ b/pkg/protocols/http/request_test.go
7@@ -583,6 +583,12 @@ func TestExecuteParallelHTTP_GoroutineLeaks(t *testing.T) {
8 // expirable LRU cache creates a background goroutine for TTL expiration that persists
9 // see: https://github.com/hashicorp/golang-lru/blob/770151e9c8cdfae1797826b7b74c33d6f103fbd8/expirable/expirable_lru.go#L79
10 goleak.IgnoreAnyContainingPkg("github.com/hashicorp/golang-lru/v2/expirable"),
11+ // net/http keep-alive connections spawn persistConn read/write loops that are
12+ // owned by the transport's idle-connection pool, not by the parallel executor.
13+ // They are torn down asynchronously on idle timeout, and on slower runners
14+ // (e.g. windows) that teardown can outlast goleak's retry window, so ignore them.
15+ goleak.IgnoreAnyFunction("net/http.(*persistConn).writeLoop"),
16+ goleak.IgnoreAnyFunction("net/http.(*persistConn).readLoop"),
17 )
18
19 options := testutils.DefaultOptions