all: fix resource leaks with missing .Close() calls
Fixes #5706 Signed-off-by: Emmanuel T Odeke <emmanuel@orijtech.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
9bdf0cd8cd
commit
f981b1d9da
@ -1188,6 +1188,8 @@ func (c *Client) measureHTTPSLatency(ctx context.Context, reg *tailcfg.DERPRegio
|
||||
var ip netip.Addr
|
||||
|
||||
dc := derphttp.NewNetcheckClient(c.logf)
|
||||
defer dc.Close()
|
||||
|
||||
tlsConn, tcpConn, node, err := dc.DialRegionTLS(ctx, reg)
|
||||
if err != nil {
|
||||
return 0, ip, err
|
||||
|
Reference in New Issue
Block a user