all repos — honk @ 2e228abe1b1b3609555ae7f1b249c0c7f2a81bf2

my fork of honk

limit the number of idle conns
Ted Unangst tedu@tedunangst.com
Fri, 08 Dec 2023 20:24:03 -0500
commit

2e228abe1b1b3609555ae7f1b249c0c7f2a81bf2

parent

b422b3407228027d3d3973d548db549d06442deb

1 files changed, 10 insertions(+), 5 deletions(-)

jump to
M activity.goactivity.go

@@ -59,13 +59,18 @@ }

return false } -var honkClient = http.Client{} +var honkTransport = http.Transport{ + MaxIdleConns: 120, + MaxConnsPerHost: 4, +} + +var honkClient = http.Client{ + Transport: &honkTransport, +} func gogglesDoNothing() { - honkClient.Transport = &http.Transport{ - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: true, - }, + honkTransport.TLSClientConfig = &tls.Config{ + InsecureSkipVerify: true, } }