Skip to content

Commit c797c9d

Browse files
committed
fix(fvt): disable keepalive on toxiproxy client
We don't want to keep the tcp conn alive as we only make very few requests and it'll show up as a leaked goroutine in-between tests. Signed-off-by: Dominic Evans <[email protected]>
1 parent 2facdec commit c797c9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/toxiproxy/client.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ func NewClient(endpoint string) *Client {
2424
KeepAlive: 30 * time.Second,
2525
}).DialContext,
2626
ForceAttemptHTTP2: true,
27-
MaxIdleConns: 100,
27+
MaxIdleConns: -1,
28+
DisableKeepAlives: true,
2829
IdleConnTimeout: 90 * time.Second,
2930
TLSHandshakeTimeout: 10 * time.Second,
3031
ExpectContinueTimeout: 1 * time.Second,

0 commit comments

Comments
 (0)